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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]