Code review request for 4881419 The type of X[].clone() should be X[]

Joe Darcy joe.darcy at
Fri Sep 3 22:05:36 UTC 2010

Ulf Zibis wrote:
> Am 03.09.2010 12:31, schrieb Ulf Zibis:
>> I think the question of variable types belongs to the spec, but here 
>> in Object class's javadoc we should speak about objects. So I now 
>> suggest:
>> "...and that the returned object of the {@code clone} method of an 
>> array object of class {@code T[]} is of class {@code T[]} where T is 
>> any [raw]? reference or primitive class. See java language 
>> specification version 3, section 6.4.5"
> And additionally 2 cents: As T is often used for parameter type in 
> context with generics, I think, X would leed to less misinterpretation 
> and would match better to the according spec.

I think the text as suggested by Martin with the explicit definition of 
T is sufficiently clear as-is.


More information about the core-libs-dev mailing list