servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r383924 - in /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders: InstallationClassLoader.java ParentFirstClassLoader.java SelfFirstClassLoader.java
Date Tue, 07 Mar 2006 16:46:45 GMT
Author: gnodet
Date: Tue Mar  7 08:46:44 2006
New Revision: 383924

URL: http://svn.apache.org/viewcvs?rev=383924&view=rev
Log:
SM-342: ensure that class loaders throw a CNFE and do not return null

Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/InstallationClassLoader.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/ParentFirstClassLoader.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/SelfFirstClassLoader.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/InstallationClassLoader.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/InstallationClassLoader.java?rev=383924&r1=383923&r2=383924&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/InstallationClassLoader.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/InstallationClassLoader.java
Tue Mar  7 08:46:44 2006
@@ -113,6 +113,8 @@
             //is it a reserved class ?
             if (name.startsWith("java.") || name.startsWith("javax.")) {
                 result = parentLoader.loadClass(name);
+            } else {
+                throw new ClassNotFoundException(name);
             }
         }
         else if (resolve) {

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/ParentFirstClassLoader.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/ParentFirstClassLoader.java?rev=383924&r1=383923&r2=383924&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/ParentFirstClassLoader.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/ParentFirstClassLoader.java
Tue Mar  7 08:46:44 2006
@@ -79,6 +79,9 @@
             catch (ClassNotFoundException e) {
             }
         }
+        if (result == null) {
+            throw new ClassNotFoundException(name);
+        }
         return result;
     }
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/SelfFirstClassLoader.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/SelfFirstClassLoader.java?rev=383924&r1=383923&r2=383924&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/SelfFirstClassLoader.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/loaders/SelfFirstClassLoader.java
Tue Mar  7 08:46:44 2006
@@ -73,6 +73,9 @@
                 }
             }
         }
+        if (result == null) {
+            throw new ClassNotFoundException(name);
+        }
         return result;
     }
 



Mime
View raw message