RFR: 4987375: (reflect) Class.get{Declared}Method{s} does not return clone() for array type

Joel Borggren-Franck joel.franck at oracle.com
Wed Sep 4 13:55:32 UTC 2013


Please review fix for: http://bugs.sun.com/view_bug.do?bug_id=4987375

Webrev: http://cr.openjdk.java.net/~jfranck/4987375/webrev.01/
Specdiff: http://cr.openjdk.java.net/~jfranck/4987375/specdiff/java/lang/Class.html

There are two issues here,

- First a getInterfaces() call on an array Class instance does return
  Cloneable and Serializable. This is specified for
  getGenericInterfaces() but not specified in getInterface(). The fix is
  to update the spec to match the implementation, which also aligns it
  with getGenericInterfaces().

- Also even though JLS states that array types have an implementation of
  clone() overriding the Object method, it is not included in
  get{Declared}Method{s}. Again the fix is to note this in the spec.

Me and Alex have also worked on the structure of the docs trying to
unify them and have a better flow. Rough outline is:

<!-- Basic result -->
<!-- Interesting results -->
<!-- Empty results -->
<!-- Order of results -->


More information about the core-libs-dev mailing list