jdk/src/share/classes/java/net/SocketPermission.java
changeset 22341 4689530d03b9
parent 22339 e91bfaf4360d
child 22633 303b60d0f31a
--- a/jdk/src/share/classes/java/net/SocketPermission.java	Wed Nov 20 23:33:07 2013 +0000
+++ b/jdk/src/share/classes/java/net/SocketPermission.java	Tue Nov 26 10:06:57 2013 +0000
@@ -44,6 +44,7 @@
 import java.io.IOException;
 import sun.net.util.IPAddressUtil;
 import sun.net.RegisteredDomain;
+import sun.net.PortConfig;
 import sun.security.util.SecurityConstants;
 import sun.security.util.Debug;
 
@@ -1217,17 +1218,9 @@
                     if (val != -1) {
                         return val;
                     } else {
-                        String prop = Security.getProperty(
-                            "network.ephemeralPortRange."+suffix
-                        );
-                        try {
-                                val = Integer.parseInt(prop);
-                        } catch (NumberFormatException e) {
-                            // shouldn't happen
-                            return defval;
-                        }
+                        return suffix.equals("low") ?
+                            PortConfig.getLower() : PortConfig.getUpper();
                     }
-                    return val;
                 }
             }
         );