geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r507771 - /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
Date Thu, 15 Feb 2007 01:50:12 GMT
Author: dblevins
Date: Wed Feb 14 17:50:11 2007
New Revision: 507771

URL: http://svn.apache.org/viewvc?view=rev&rev=507771
Log:
check package instance for null

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

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java?view=diff&rev=507771&r1=507770&r2=507771
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
Wed Feb 14 17:50:11 2007
@@ -149,9 +149,11 @@
         List<Info> infos = new ArrayList();
         List<Package> packages = new ArrayList();
         for (Class clazz : classes) {
-            if (!packages.contains(clazz.getPackage())){
-                infos.add(new PackageInfo(clazz.getPackage()));
-                packages.add(clazz.getPackage());
+
+            Package aPackage = clazz.getPackage();
+            if (aPackage != null && !packages.contains(aPackage)){
+                infos.add(new PackageInfo(aPackage));
+                packages.add(aPackage);
             }
 
             ClassInfo classInfo = new ClassInfo(clazz);



Mime
View raw message