JDK-4651775 : (reflect spec) Class.get(Declared)+{Method,Constructor} does not define "match"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2002-03-13
  • Updated: 2012-09-28
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The javadoc for Class.getMethod, Class.getDeclaredMethod, Class.getConstructor,
and Class.getDeclaredConstructor does not specify what a "match" will be.
These methods require that the array of parameterTypes contain an instance of
the exact class that is declared in the target method/constructor.  No 
overload resolution is performed.

-- iag@sfbay 2002-03-12

Comments
EVALUATION We should update the specification as indicated in the description. If we choose to perform overload resolution in reflection (see bugs 4520558, 4283544, etc.) we would not want to change the behaviour of these specific methods as that would cause compatibility problems. See bug 4287725 for the RFE to add methods with similar functionality which do handle overload resolution. -- iag@sfbay 2002-05-16 Since we do not perform overload resolution and
16-05-2002