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 791760a commit 7ea73ebCopy full SHA for 7ea73eb
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;
@@ -339,8 +341,7 @@ private static class PolicyInfo {
339
341
}
340
342
343
- @SuppressWarnings("deprecation")
- private static URL newURL(String spec) throws MalformedURLException {
344
- return new URL(spec);
+ private static URL newURL(String spec) throws MalformedURLException, URISyntaxException {
345
+ return new URI(spec).toURL();
346
347
0 commit comments