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

Joel Borggren-Franck joel.franck at oracle.com
Thu Sep 5 14:04:30 UTC 2013


Hi Florian,

On 2013-09-05, Florian Weimer wrote:
> On 09/04/2013 03:55 PM, Joel Borggren-Franck wrote:
> >Hi,
> >
> >Please review fix for: http://bugs.sun.com/view_bug.do?bug_id=4987375
> >
> >Webrev: http://cr.openjdk.java.net/~jfranck/4987375/webrev.01/
> 
> This:
> 
> +     * <p> If this Class object represents an array type, then the
> returned array
> +     * has a Method object for each of the public methods inherited by the
> +     * array type from {@code Object}, except for clone().
> 
> should say
> 
> "array type from {@code Object}.  Although array types define a
> public {@code clone()} method, it is not included in the returned
> array."
> 
> Object#clone() is protected (not public), and clone() should use
> @code markup.
> 

I agree clone() should be {@code clone()}.

I don't think the JLS uses "define". Also I think it is actually ok
since clone() isn't public. Perhaps change to:

 * has a Method object for each of the public methods inherited by the
 * array type from {@code Object}. It does not contain a Method object
 * for {@code clone()}.

cheers
/Joel



More information about the core-libs-dev mailing list