MethodUtils.getAccessibleMethod(Method method) could not find right public 
method
---------------------------------------------------------------------------------

                 Key: BEANUTILS-298
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-298
             Project: Commons BeanUtils
          Issue Type: Bug
          Components: Bean / Property Utils
    Affects Versions: 1.8.0-BETA, 1.7.0
         Environment: Java 1.5, Windows XP
            Reporter: Roman Mukhin
            Priority: Minor


Let assume follows:

public interface IX {
  getName();
}

class BaseX {
  public getName();
}


class ImplX  extends BaseX implements IX {
}

For some reason I do not want that BaseX implements IX, but if we have a bean 
of type ImplX we can call getName().

PropertyUtils.getProperty(beanOfTypeBaseX, "name") could not get the value, 
because the method MethodUtils.getAccessibleMethod(Method method)  looks up 
only throunght supercalsses and interfaces of implementing class but not the 
subclasses and interfaces that they implement!

So PropertyUtils.getProperty(beanOfTypeBaseX, "name") throws an Exception that 
the method is not accessible, but at the same time I can call 
beanOfTypeBaseX.getName()

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to