< prev index next >

src/java.base/unix/classes/java/net/DefaultDatagramSocketImplFactory.java

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

*** 22,32 **** * or visit www.oracle.com if you need additional information or have any * questions. */ package java.net; ! import java.security.AccessController; /** * This class defines a factory for creating DatagramSocketImpls. It defaults * to creating plain DatagramSocketImpls, but may create other DatagramSocketImpls * by setting the impl.prefix system property. --- 22,32 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package java.net; ! import sun.security.action.GetPropertyAction; /** * This class defines a factory for creating DatagramSocketImpls. It defaults * to creating plain DatagramSocketImpls, but may create other DatagramSocketImpls * by setting the impl.prefix system property.
*** 38,49 **** static Class<?> prefixImplClass = null; static { String prefix = null; try { ! prefix = AccessController.doPrivileged( ! new sun.security.action.GetPropertyAction("impl.prefix", null)); if (prefix != null) prefixImplClass = Class.forName("java.net."+prefix+"DatagramSocketImpl"); } catch (Exception e) { System.err.println("Can't find class: java.net." + prefix + --- 38,48 ---- static Class<?> prefixImplClass = null; static { String prefix = null; try { ! prefix = GetPropertyAction.getProperty("impl.prefix", null); if (prefix != null) prefixImplClass = Class.forName("java.net."+prefix+"DatagramSocketImpl"); } catch (Exception e) { System.err.println("Can't find class: java.net." + prefix +
< prev index next >