incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daw...@apache.org
Subject svn commit: r924494 - /incubator/imperius/trunk/imperius-javaspl/src/main/java/org/apache/imperius/javaspl/JavaActuatorImpl.java
Date Wed, 17 Mar 2010 21:03:50 GMT
Author: dawood
Date: Wed Mar 17 21:03:50 2010
New Revision: 924494

URL: http://svn.apache.org/viewvc?rev=924494&view=rev
Log:
Handle static methods and fields which was broken on the last checkin.

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=924494&r1=924493&r2=924494&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 21:03:50 2010
@@ -49,14 +49,16 @@ public class JavaActuatorImpl implements
 	//private static final String sourceClass="JavaActuatorImpl";
 	//private static Logger logger = SPLLogger.getCIMSPLLogger().getLogger();
 
-	private URL[] fUrls = null;
-	
+//	private URL[] fUrls = null;
+	private URLClassLoader urlLoader = null;
 	public JavaActuatorImpl() {
 		
 	}
 	
 	public JavaActuatorImpl(URL[] urls) {
-		fUrls = urls;
+//		fUrls = urls;
+		if (urls != null)
+			urlLoader = new URLClassLoader(urls);
 	}
 	
 	
@@ -73,12 +75,12 @@ public class JavaActuatorImpl implements
 			//c = Class.forName(instance.getClass().getName());
 			
 			// modified by naidu to enable URL class loading
-			if(fUrls == null) {
-//				c = Class.forName(instance.getClass().getName());
+			if (instance != null) {
 				c = instance.getClass();	// dawood 3/17/2010 - useful when interface implementation is
not public
+			} else if(urlLoader == null) {
+				c = Class.forName(className);	
 			} else {
-				URLClassLoader uc = new URLClassLoader(fUrls);
-				c = uc.loadClass(instance.getClass().getName());
+				c = urlLoader.loadClass(className);
 			}
 			
 			
@@ -183,17 +185,13 @@ 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 = instance.getClass();	// dawood 3/17/2010 - useful when interface implementation
is not public
-            } else {
-                URLClassLoader uc = new URLClassLoader(fUrls);
-                c = uc.loadClass(className);
-            }
-			
+			if (instance != null) {
+				c = instance.getClass();	// dawood 3/17/2010 - useful when interface implementation is
not public
+			} else if(urlLoader == null) {
+				c = Class.forName(className);	
+			} else {
+				c = urlLoader.loadClass(className);
+			}
 
 
             // Iterate over the property map for the instance



Mime
View raw message