incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r414553 - in /incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB: Util.java ValueWriter.java
Date Thu, 15 Jun 2006 10:58:03 GMT
Author: ahj
Date: Thu Jun 15 03:58:02 2006
New Revision: 414553

URL: http://svn.apache.org/viewvc?rev=414553&view=rev
Log:
YOKO-63: Fixing the class loading issues causing RMITest og PiTest to fail.

Modified:
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/Util.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/ValueWriter.java

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/Util.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/Util.java?rev=414553&r1=414552&r2=414553&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/Util.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/Util.java Thu Jun 15 03:58:02
2006
@@ -505,7 +505,10 @@
             String helper = exClass.getName() + "Helper";
             // get the appropriate class for the loading.
             ClassLoader loader = exClass.getClassLoader();
-            Class c = loader.loadClass(helper);
+            if(loader == null) {
+            	loader = Thread.currentThread().getContextClassLoader();
+            }
+        	Class c = loader.loadClass(helper);
             final Class[] paramTypes = { org.omg.CORBA.Any.class, exClass };
             java.lang.reflect.Method m = c.getMethod("insert", paramTypes);
             final java.lang.Object[] args = { any, ex };

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/ValueWriter.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/ValueWriter.java?rev=414553&r1=414552&r2=414553&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/ValueWriter.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/ValueWriter.java Thu Jun
15 03:58:02 2006
@@ -15,6 +15,7 @@
 
 import javax.rmi.CORBA.ValueHandler;
 
+import org.apache.yoko.orb.CORBA.ORB;
 import org.omg.CORBA.portable.BoxedValueHelper;
 
 final public class ValueWriter {
@@ -187,6 +188,9 @@
             String name = value.getClass().getName() + "Helper";
             // get the appropriate class for the loading.
             ClassLoader loader = value.getClass().getClassLoader();
+            if(loader == null) {
+            	loader = Thread.currentThread().getContextClassLoader();
+            }
             Class c = loader.loadClass(name);
             if (BoxedValueHelper.class.isAssignableFrom(c))
                 helperClass = c;



Mime
View raw message