Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.1
-
Fix Version/s: 0.1
-
Component/s: None
-
Labels:None
Description
Class.getMethod searches recursively up through superclasses, it also returns the answer with the most assignable return type (eg it prefers Object over Integer). However, when an answer is found the superclasses shouldn't be searched as doing so yields problems with for example:
class A {
static void foo() {...}
}
class B extends A {
static void foo() {...}
}
B.class.getMethod("foo",new Class[]{}) will currently return A.foo and not B.foo
Issue Links
- is related to
-
MRP-3
Incorrect wrapping of InvocationTargetException with bytecode reflection
-
Fixed, http://git.codehaus.org/gitweb.cgi?p=mrp.git;a=blobdiff;f=libraryInterface/Common/src/java/lang/Class.java;h=d6c9d1863d3d7b1d31a9ccc348c2addaf57b373d;hp=8c10785c3fea2b6aab8e5e28b9ed83058b7aee09;hb=511d0148d432f93c7d7e6c89633ab693c26d5268;hpb=cda33b4c8ad40c2e20f4edfeb1b7ae119db85fef