We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0942b10 commit 2b18f7dCopy full SHA for 2b18f7d
libs/agent-sm/agent-policy/src/main/java/org/opensearch/secure_sm/policy/PolicyFile.java
@@ -17,6 +17,8 @@
17
import java.net.MalformedURLException;
18
import java.net.NetPermission;
19
import java.net.SocketPermission;
20
+import java.net.URI;
21
+import java.net.URISyntaxException;
22
import java.net.URL;
23
import java.net.URLDecoder;
24
import java.nio.charset.StandardCharsets;
@@ -341,8 +343,8 @@ private static class PolicyInfo {
341
343
}
342
344
345
- @SuppressWarnings("deprecation")
- private static URL newURL(String spec) throws MalformedURLException {
346
- return new URL(spec);
+ private static URL newURL(String spec) throws MalformedURLException, URISyntaxException {
347
+
348
+ return new URI(spec).toURL();
349
350
0 commit comments