incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daw...@apache.org
Subject svn commit: r924401 - /incubator/imperius/trunk/imperius-javaspl/src/main/java/org/apache/imperius/javaspl/JavaActuatorImpl.java
Date Wed, 17 Mar 2010 18:23:37 GMT
Author: dawood
Date: Wed Mar 17 18:23:36 2010
New Revision: 924401

URL: http://svn.apache.org/viewvc?rev=924401&view=rev
Log:
Change invokeMethod() and modifyInstance() to use instance.getClass() instead of Class.forName(instance.getClass().getName()).
 The latter was causing ClassNotFoundExceptions when the implementation of an interface was
not public.

Modified:
    incubator/imperius/trunk/imperius-javaspl/src/main/java/org/apache/imperius/javaspl/JavaActuatorImpl.java

Modified: incubator/imperius/trunk/imperius-javaspl/src/main/java/org/apache/imperius/javaspl/JavaActuatorImpl.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-javaspl/src/main/java/org/apache/imperius/javaspl/JavaActuatorImpl.java?rev=924401&r1=924400&r2=924401&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-javaspl/src/main/java/org/apache/imperius/javaspl/JavaActuatorImpl.java
(original)
+++ incubator/imperius/trunk/imperius-javaspl/src/main/java/org/apache/imperius/javaspl/JavaActuatorImpl.java
Wed Mar 17 18:23:36 2010
@@ -74,12 +74,14 @@ public class JavaActuatorImpl implements
 			
 			// modified by naidu to enable URL class loading
 			if(fUrls == null) {
-				c = Class.forName(instance.getClass().getName());
+//				c = Class.forName(instance.getClass().getName());
+				c = instance.getClass();	// dawood 3/17/2010 - useful when interface implementation is
not public
 			} else {
 				URLClassLoader uc = new URLClassLoader(fUrls);
 				c = uc.loadClass(instance.getClass().getName());
 			}
 			
+			
 
 			// Get an array of formal parameter class types
 			Class[] arrayOfParameterTypes = _getParameterTypeArray(arguments);
@@ -181,13 +183,18 @@ public class JavaActuatorImpl implements
             // Load class
             //c = Class.forName(className);
             
+        	// dawood 3/2010 i'm not sure, but i think the className may actually be the instance
name
+        	//    as defined in the policy.
             // modified by naidu to enable URL class loading
             if(fUrls == null) {
-                c = Class.forName(className);
+//                c = Class.forName(className);
+                c = instance.getClass();	// dawood 3/17/2010 - useful when interface implementation
is not public
             } else {
                 URLClassLoader uc = new URLClassLoader(fUrls);
                 c = uc.loadClass(className);
             }
+			
+
 
             // Iterate over the property map for the instance
             Iterator keyIt = memberMap.keySet().iterator();



Mime
View raw message