commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject svn commit: r156189 - jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ValueUtils.java
Date Fri, 04 Mar 2005 17:51:52 GMT
Author: dmitri
Date: Fri Mar  4 09:51:50 2005
New Revision: 156189

URL: http://svn.apache.org/viewcvs?view=rev&rev=156189
Log:
Made getAccessibleMethod recurse through the hierarchy. Great thanks to Vasiliy Stashuk.

Modified:
    jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ValueUtils.java

Modified: jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ValueUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ValueUtils.java?view=diff&r1=156188&r2=156189
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ValueUtils.java
(original)
+++ jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ValueUtils.java
Fri Mar  4 09:51:50 2005
@@ -553,13 +553,16 @@
             return (method);
         }
 
-        // Check the implemented interfaces and subinterfaces
-        method =
-            getAccessibleMethodFromInterfaceNest(
-                clazz,
-                method.getName(),
-                method.getParameterTypes());
-        return (method);
+        while (clazz != null) {
+            // Check the implemented interfaces and subinterfaces
+            Method aMethod = getAccessibleMethodFromInterfaceNest(clazz, 
+                    method.getName(), method.getParameterTypes());
+            if (aMethod != null) {
+                return aMethod;
+            }
+            clazz = clazz.getSuperclass();
+        }
+        return null;
     }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message