changeset 535:8d07115924b7 jdk8-b115

Merge
author lana
date Thu, 31 Oct 2013 16:30:42 -0700
parents d425685e0b74 219e616a6a4f
children 5fdc44652089
files
diffstat 5 files changed, 27 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java	Thu Oct 31 12:36:05 2013 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java	Thu Oct 31 16:30:42 2013 -0700
@@ -580,7 +580,7 @@
             java.lang.Object[] objholder = new java.lang.Object[1];
             objholder[0] = object;
             long[] longholder = new long[1];
-            TCUtility.unmarshalIn(in, typeCode, longholder, objholder);
+            TCUtility.unmarshalIn(in, realType(), longholder, objholder);
             value = longholder[0];
             object = objholder[0];
             stream = null;
--- a/src/share/classes/javax/rmi/CORBA/Stub.java	Thu Oct 31 12:36:05 2013 -0700
+++ b/src/share/classes/javax/rmi/CORBA/Stub.java	Thu Oct 31 16:30:42 2013 -0700
@@ -61,13 +61,11 @@
     private transient StubDelegate stubDelegate = null;
     private static Class stubDelegateClass = null;
     private static final String StubClassKey = "javax.rmi.CORBA.StubClass";
-    private static final String defaultStubImplName = "com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl";
 
     static {
-        Object stubDelegateInstance = (Object) createDelegateIfSpecified(StubClassKey, defaultStubImplName);
+        Object stubDelegateInstance = createDelegate(StubClassKey);
         if (stubDelegateInstance != null)
             stubDelegateClass = stubDelegateInstance.getClass();
-
     }
 
 
@@ -207,7 +205,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 PortableRemoteObject. Also in Util.java
-    private static Object createDelegateIfSpecified(String classKey, String defaultClassName) {
+    private static Object createDelegate(String classKey) {
         String className = (String)
             AccessController.doPrivileged(new GetPropertyAction(classKey));
         if (className == null) {
@@ -218,7 +216,7 @@
         }
 
         if (className == null) {
-            className = defaultClassName;
+            return new com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl();
         }
 
         try {
--- a/src/share/classes/javax/rmi/CORBA/Util.java	Thu Oct 31 12:36:05 2013 -0700
+++ b/src/share/classes/javax/rmi/CORBA/Util.java	Thu Oct 31 16:30:42 2013 -0700
@@ -60,14 +60,11 @@
 public class Util {
 
     // This can only be set at static initialization time (no sync necessary).
-    private static javax.rmi.CORBA.UtilDelegate utilDelegate = null;
+    private static final javax.rmi.CORBA.UtilDelegate utilDelegate;
     private static final String UtilClassKey = "javax.rmi.CORBA.UtilClass";
-    private static final String defaultUtilImplName =
-"com.sun.corba.se.impl.javax.rmi.CORBA.Util";
 
     static {
-        utilDelegate = (javax.rmi.CORBA.UtilDelegate)
-            createDelegateIfSpecified(UtilClassKey, defaultUtilImplName);
+        utilDelegate = (javax.rmi.CORBA.UtilDelegate)createDelegate(UtilClassKey);
     }
 
     private Util(){}
@@ -338,9 +335,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 PortableRemoteObject. Also in Stub.java
-    private static Object createDelegateIfSpecified(String classKey,
-        String defaultClassName)
-    {
+    private static Object createDelegate(String classKey) {
         String className = (String)
             AccessController.doPrivileged(new GetPropertyAction(classKey));
         if (className == null) {
@@ -351,7 +346,7 @@
         }
 
         if (className == null) {
-            className = defaultClassName;
+            return new com.sun.corba.se.impl.javax.rmi.CORBA.Util();
         }
 
         try {
--- a/src/share/classes/javax/rmi/PortableRemoteObject.java	Thu Oct 31 12:36:05 2013 -0700
+++ b/src/share/classes/javax/rmi/PortableRemoteObject.java	Thu Oct 31 16:30:42 2013 -0700
@@ -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 {
--- a/src/share/classes/org/omg/CORBA/ORB.java	Thu Oct 31 12:36:05 2013 -0700
+++ b/src/share/classes/org/omg/CORBA/ORB.java	Thu Oct 31 16:30:42 2013 -0700
@@ -174,15 +174,6 @@
     private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass";
 
     //
-    // The last resort fallback ORB implementation classes in case
-    // no ORB implementation class is dynamically configured through
-    // properties or applet parameters. Change these values to
-    // vendor-specific class names.
-    //
-    private static final String defaultORB = "com.sun.corba.se.impl.orb.ORBImpl";
-    private static final String defaultORBSingleton = "com.sun.corba.se.impl.orb.ORBSingleton";
-
-    //
     // The global instance of the singleton ORB implementation which
     // acts as a factory for typecodes for generated Helper classes.
     // TypeCodes should be immutable since they may be shared across
@@ -294,10 +285,11 @@
             String className = getSystemProperty(ORBSingletonClassKey);
             if (className == null)
                 className = getPropertyFromFile(ORBSingletonClassKey);
-            if (className == null)
-                className = defaultORBSingleton;
-
-            singleton = create_impl(className);
+            if (className == null) {
+                singleton = new com.sun.corba.se.impl.orb.ORBSingleton();
+            } else {
+                singleton = create_impl(className);
+            }
         }
         return singleton;
     }
@@ -347,10 +339,12 @@
             className = getSystemProperty(ORBClassKey);
         if (className == null)
             className = getPropertyFromFile(ORBClassKey);
-        if (className == null)
-            className = defaultORB;
+        if (className == null) {
+            orb = new com.sun.corba.se.impl.orb.ORBImpl();
+        } else {
+            orb = create_impl(className);
+        }
 
-        orb = create_impl(className);
         orb.set_parameters(args, props);
         return orb;
     }
@@ -375,10 +369,12 @@
             className = getSystemProperty(ORBClassKey);
         if (className == null)
             className = getPropertyFromFile(ORBClassKey);
-        if (className == null)
-            className = defaultORB;
+        if (className == null) {
+            orb = new com.sun.corba.se.impl.orb.ORBImpl();
+        } else {
+            orb = create_impl(className);
+        }
 
-        orb = create_impl(className);
         orb.set_parameters(app, props);
         return orb;
     }