hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r426407 - /hivemind/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
Date Fri, 28 Jul 2006 06:49:40 GMT
Author: knut
Date: Thu Jul 27 23:49:40 2006
New Revision: 426407

URL: http://svn.apache.org/viewvc?rev=426407&view=rev
Log:
Explicitly include the classloader used to load the HiveMind classes in the classloader hierarchy
used by ClassFactory (through HiveMindClassPool)

Modified:
    hivemind/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java

Modified: hivemind/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
URL: http://svn.apache.org/viewvc/hivemind/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java?rev=426407&r1=426406&r2=426407&view=diff
==============================================================================
--- hivemind/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
(original)
+++ hivemind/trunk/framework/src/java/org/apache/hivemind/service/impl/ClassFactoryClassLoader.java
Thu Jul 27 23:49:40 2006
@@ -27,6 +27,11 @@
 {
     private List _loaders = new ArrayList();
 
+    public ClassFactoryClassLoader(ClassLoader parent)
+    {
+        super(parent);
+    }
+
     /**
      * Adds a delegate class loader to the list of delegate class loaders.
      */
@@ -40,17 +45,6 @@
      */
     protected synchronized Class findClass(String name) throws ClassNotFoundException
     {
-        ClassNotFoundException cnfex = null;
-
-        try
-        {
-            return super.findClass(name);
-        }
-        catch (ClassNotFoundException ex)
-        {
-            cnfex = ex;
-        }
-
         int count = _loaders.size();
         for (int i = 0; i < count; i++)
         {
@@ -68,7 +62,7 @@
 
         // Not found .. through the first exception
 
-        throw cnfex;
+        throw new ClassNotFoundException(name);
     }
 
 }



Mime
View raw message