openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1035109 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Date Mon, 15 Nov 2010 00:40:54 GMT
Author: djencks
Date: Mon Nov 15 00:40:54 2010
New Revision: 1035109

URL: http://svn.apache.org/viewvc?rev=1035109&view=rev
Log:
OWB-491, CDITCK-178 Find all the interfaces, not just those on the supplied class

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=1035109&r1=1035108&r2=1035109&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Mon Nov 15 00:40:54 2010
@@ -1764,14 +1764,18 @@ public final class ClassUtil
     {
         Asserts.nullCheckForClass(clazz);
 
-        Class<?>[] interfaces = clazz.getInterfaces();
-
-        for (Class<?> cl : interfaces)
+        do
         {
-            set.add(cl);
+            Class<?>[] interfaces = clazz.getInterfaces();
 
-            setTypeHierarchy(set, cl);
-        }
+            for (Class<?> cl : interfaces)
+            {
+                set.add(cl);
+
+                setTypeHierarchy(set, cl);
+            }
+            clazz = clazz.getSuperclass();
+        } while (clazz != null && clazz != Object.class);
 
         return set;
     }



Mime
View raw message