geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r811210 - /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java
Date Fri, 04 Sep 2009 03:07:39 GMT
Author: dblevins
Date: Fri Sep  4 03:07:39 2009
New Revision: 811210

URL: http://svn.apache.org/viewvc?rev=811210&view=rev
Log:
Patch from Karan Malhi, XBEAN-134: If you have a package-info.java in a package, then ClassFinder
throws a ClassCastException when calling the findInheritedAnnotatedClasses
Thanks, Karan!

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?rev=811210&r1=811209&r2=811210&view=diff
==============================================================================
--- 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
Fri Sep  4 03:07:39 2009
@@ -261,7 +261,9 @@
         List<Info> infos = getAnnotationInfos(annotation.getName());
         for (Info info : infos) {
             try {
-                classes.add(((ClassInfo) info).get());
+            	if(info instanceof ClassInfo){
+                   classes.add(((ClassInfo) info).get());
+            	}
             } catch (ClassNotFoundException cnfe) {
                 // TODO: ignored, but a log message would be appropriate
             }



Mime
View raw message