diff -r 1c01208087b5 -r 52ad44f9a3ec src/share/classes/javax/rmi/PortableRemoteObject.java --- a/src/share/classes/javax/rmi/PortableRemoteObject.java Thu Oct 17 14:17:54 2013 -0700 +++ b/src/share/classes/javax/rmi/PortableRemoteObject.java Tue Oct 22 11:40:27 2013 +0100 @@ -65,17 +65,14 @@ */ public class PortableRemoteObject { - private static javax.rmi.CORBA.PortableRemoteObjectDelegate proDelegate = null; + private static final javax.rmi.CORBA.PortableRemoteObjectDelegate proDelegate; private static final String PortableRemoteObjectClassKey = "javax.rmi.CORBA.PortableRemoteObjectClass"; - private static final String defaultPortableRemoteObjectImplName = - "com.sun.corba.se.impl.javax.rmi.PortableRemoteObject"; - static { proDelegate = (javax.rmi.CORBA.PortableRemoteObjectDelegate) - createDelegateIfSpecified(PortableRemoteObjectClassKey); + createDelegate(PortableRemoteObjectClassKey); } /** @@ -181,7 +178,7 @@ // are in different packages and the visibility needs to be package for // security reasons. If you know a better solution how to share this code // then remove it from here. - private static Object createDelegateIfSpecified(String classKey) { + private static Object createDelegate(String classKey) { String className = (String) AccessController.doPrivileged(new GetPropertyAction(classKey)); if (className == null) { @@ -191,7 +188,7 @@ } } if (className == null) { - className = defaultPortableRemoteObjectImplName; + return new com.sun.corba.se.impl.javax.rmi.PortableRemoteObject(); } try {