geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r779857 - /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/ReflectionUtils.java
Date Fri, 29 May 2009 06:18:43 GMT
Author: gnodet
Date: Fri May 29 06:18:43 2009
New Revision: 779857

URL: http://svn.apache.org/viewvc?rev=779857&view=rev
Log:
Avoid exposing non public classes / interfaces

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/ReflectionUtils.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/ReflectionUtils.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/ReflectionUtils.java?rev=779857&r1=779856&r2=779857&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/ReflectionUtils.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/utils/ReflectionUtils.java
Fri May 29 06:18:43 2009
@@ -42,7 +42,9 @@
     public static Set<String> getImplementedInterfaces(Set<String> classes, Class
clazz) {
         if (clazz != null && clazz != Object.class) {
             for (Class itf : clazz.getInterfaces()) {
-                classes.add(itf.getName());
+                if (Modifier.isPublic(itf.getModifiers())) {
+                    classes.add(itf.getName());
+                }
                 getImplementedInterfaces(classes, itf);
             }
             getImplementedInterfaces(classes, clazz.getSuperclass());
@@ -52,7 +54,9 @@
 
     public static Set<String> getSuperClasses(Set<String> classes, Class clazz)
{
         if (clazz != null && clazz != Object.class) {
-            classes.add(clazz.getName());
+            if (Modifier.isPublic(clazz.getModifiers())) {
+                classes.add(clazz.getName());
+            }
             getSuperClasses(classes, clazz.getSuperclass());
         }
         return classes;



Mime
View raw message