< prev index next >

src/java.base/share/classes/sun/net/ResourceManager.java

Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs

@@ -51,13 +51,12 @@
     private static final int DEFAULT_MAX_SOCKETS = 25;
     private static final int maxSockets;
     private static final AtomicInteger numSockets;
 
     static {
-        String prop = java.security.AccessController.doPrivileged(
-            new GetPropertyAction("sun.net.maxDatagramSockets")
-        );
+        String prop =
+                GetPropertyAction.getProperty("sun.net.maxDatagramSockets");
         int defmax = DEFAULT_MAX_SOCKETS;
         try {
             if (prop != null) {
                 defmax = Integer.parseInt(prop);
             }
< prev index next >