geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1127357 - /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/archive/ClassesArchive.java
Date Wed, 25 May 2011 01:52:03 GMT
Author: dblevins
Date: Wed May 25 01:52:03 2011
New Revision: 1127357

URL: http://svn.apache.org/viewvc?rev=1127357&view=rev
Log:
Skip null classes and null classloaders

Modified:
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/archive/ClassesArchive.java

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/archive/ClassesArchive.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/archive/ClassesArchive.java?rev=1127357&r1=1127356&r2=1127357&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/archive/ClassesArchive.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/archive/ClassesArchive.java
Wed May 25 01:52:03 2011
@@ -39,7 +39,11 @@ public class ClassesArchive implements A
     }
 
     public ClassesArchive(Iterable<Class<?>> classes) {
+        assert classes != null;
+
         for (Class<?> clazz : classes) {
+            if (clazz == null) continue;
+            if (clazz.getClassLoader() == null) continue;
             this.classes.put(clazz.getName(), clazz);
             loaders.add(clazz.getClassLoader());
         }
@@ -52,6 +56,8 @@ public class ClassesArchive implements A
 
     @Override
     public InputStream getBytecode(String className) throws IOException, ClassNotFoundException
{
+        assert className != null;
+
         int pos = className.indexOf("<");
         if (pos > -1) {
             className = className.substring(0, pos);



Mime
View raw message