geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r810007 - /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/BundleDelegatingClassLoader.java
Date Tue, 01 Sep 2009 12:41:09 GMT
Author: gnodet
Date: Tue Sep  1 12:41:09 2009
New Revision: 810007

URL: http://svn.apache.org/viewvc?rev=810007&view=rev
Log:
[blueprint] show the bundle trying to load a class when throwing a CNFE

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/BundleDelegatingClassLoader.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/BundleDelegatingClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/BundleDelegatingClassLoader.java?rev=810007&r1=810006&r2=810007&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/BundleDelegatingClassLoader.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/BundleDelegatingClassLoader.java
Tue Sep  1 12:41:09 2009
@@ -66,10 +66,15 @@
             clazz = findClass(name);
         }
         catch (ClassNotFoundException cnfe) {
-            if (classLoader != null)
-                clazz = classLoader.loadClass(name);
-            else
-                throw cnfe;
+            if (classLoader != null) {
+                try {
+                    clazz = classLoader.loadClass(name);
+                } catch (ClassNotFoundException e) {
+                    throw new ClassNotFoundException(name + " from bundle " + bundle.getBundleId()
+ " (" + bundle.getSymbolicName() + ")", cnfe);
+                }
+            } else {
+                throw new ClassNotFoundException(name + " from bundle " + bundle.getBundleId()
+ " (" + bundle.getSymbolicName() + ")", cnfe);
+            }
         }
         if (resolve) {
             resolveClass(clazz);



Mime
View raw message