geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r683959 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
Date Fri, 08 Aug 2008 13:07:12 GMT
Author: dwoods
Date: Fri Aug  8 06:07:11 2008
New Revision: 683959

URL: http://svn.apache.org/viewvc?rev=683959&view=rev
Log:
GERONIMO-4231 Build exception: java.net.MalformedURLException: no /Applications/Firefox.app/Contents/MacOS/firefox
in spec.  Added catch block and a log.debug() of the class name and exception, in case this
ever becomes a runtime issue.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java?rev=683959&r1=683958&r2=683959&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/MultiParentClassLoader.java
Fri Aug  8 06:07:11 2008
@@ -22,6 +22,7 @@
 import java.io.ObjectOutputStream;
 import java.io.ObjectStreamClass;
 import java.lang.reflect.Field;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.URLStreamHandlerFactory;
@@ -450,7 +451,7 @@
      * @return
      * @throws ClassNotFoundException
      */
-    protected synchronized Class<?> loadClassInternal(String name, boolean resolve,
LinkedList<ClassLoader> visitedClassLoaders) throws ClassNotFoundException {
+    protected synchronized Class<?> loadClassInternal(String name, boolean resolve,
LinkedList<ClassLoader> visitedClassLoaders) throws ClassNotFoundException, MalformedURLException
{
         //
         // Check if class is in the loaded classes cache
         //
@@ -498,10 +499,10 @@
      * @throws ClassNotFoundException
      */
     private synchronized Class<?> checkParents(String name, boolean resolve, LinkedList<ClassLoader>
visitedClassLoaders) throws ClassNotFoundException {
-     	for (ClassLoader parent : parents) {
-    		if (!visitedClassLoaders.contains(parent)) {
-    	        visitedClassLoaders.add(parent);  // Track that we've been here before
-    		    try {
+        for (ClassLoader parent : parents) {
+            if (!visitedClassLoaders.contains(parent)) {
+                visitedClassLoaders.add(parent);  // Track that we've been here before
+                try {
         	        if (parent instanceof MultiParentClassLoader) {
         	        	Class clazz = ((MultiParentClassLoader) parent).loadClassInternal(name,
resolve, visitedClassLoaders);
         	        	if (clazz != null) return resolveClass(clazz, resolve);
@@ -509,9 +510,11 @@
         	        	return parent.loadClass(name);
         	        }
     	    	} catch (ClassNotFoundException cnfe) {
-        	    	// ignore
-        	    }
-    		}
+                    // ignore
+                } catch (MalformedURLException me) {
+                    log.debug("Failed findClass for {}", name, me);
+                }
+            }
     	} 
      	// To avoid yet another CNFE we'll simply return null and let the caller handle appropriately.
     	return null;



Mime
View raw message