mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8294241: Deprecate URL public constructors
Reviewed-by: joehw, prr, alanb, aefimov, michaelm
This commit is contained in:
parent
68209adfa7
commit
4338f527aa
82 changed files with 848 additions and 146 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
package java.security;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.io.*;
|
||||
|
@ -135,10 +136,10 @@ public final class Security {
|
|||
File propFile = new File(extraPropFile);
|
||||
URL propURL;
|
||||
if (propFile.exists()) {
|
||||
propURL = new URL
|
||||
propURL = newURL
|
||||
("file:" + propFile.getCanonicalPath());
|
||||
} else {
|
||||
propURL = new URL(extraPropFile);
|
||||
propURL = newURL(extraPropFile);
|
||||
}
|
||||
|
||||
is = propURL.openStream();
|
||||
|
@ -993,4 +994,9 @@ public final class Security {
|
|||
}
|
||||
return Collections.unmodifiableSet(result);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static URL newURL(String spec) throws MalformedURLException {
|
||||
return new URL(spec);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue