--- a/jdk/src/java.base/share/classes/java/net/URL.java Thu Apr 21 14:56:40 2016 +0800
+++ b/jdk/src/java.base/share/classes/java/net/URL.java Thu Apr 21 13:39:53 2016 +0200
@@ -42,6 +42,7 @@
import java.util.ServiceLoader;
import sun.security.util.SecurityConstants;
+import sun.security.action.GetPropertyAction;
/**
* Class {@code URL} represents a Uniform Resource
@@ -1210,12 +1211,8 @@
}
private static URLStreamHandler lookupViaProperty(String protocol) {
- String packagePrefixList = java.security.AccessController.doPrivileged(
- new PrivilegedAction<>() {
- public String run() {
- return System.getProperty(protocolPathProp, null);
- }
- });
+ String packagePrefixList =
+ GetPropertyAction.getProperty(protocolPathProp);
if (packagePrefixList == null) {
// not set
return null;