-
Bug
-
Resolution: Fixed
-
P4
-
1.1, 1.4.0, 5.0
-
b40
-
generic
-
generic
Name: nt126004 Date: 09/28/2001
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
The following example should return "0" as mentioned in the Java API
Documentation for java.lang.Class.getMethods():
-- extracted from documentation:
This method returns an array of length 0 if this Class object represents a class
or interface that has no public member methods, or if this Class object
represents an array class, primitive type, or void.
---
public class test
{
public static void main(String[] args) {
System.out.println(args.getClass().getMethods().length);
}
}
=> returns 9 (all inherited Methods from java/lang/Object).
(Review ID: 132553)
======================================================================
- relates to
-
JDK-4987375 (reflect) Class.get{Declared}Method{s} does not return clone() for array types
- Closed