JDK-6283803 : Minor typo in documentation of Collection
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 5.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-06-10
  • Updated: 2021-03-03
  • Resolved: 2005-09-25
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :


ADDITIONAL OS VERSION INFORMATION :
not necessary

A DESCRIPTION OF THE PROBLEM :
The description of the toArray(K[]) method begins thus:
<T> T[] toArray(T[] a)

    Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this collection.

    If this collection fits in the specified array with room to spare (i.e., the array has more elements than this collection), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of this collection only if the caller knows that this collection does not contain any null elements.)

The last parenthesis should be removed.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html#toArray(T[])


REPRODUCIBILITY :
This bug can be reproduced always.
###@###.### 2005-06-10 12:05:44 GMT

Comments
EVALUATION It looks like this was fixed as part of the monster jsr166x putback in b51. Closing this as a dup of 6271387: (coll spec) toArray method javadocs are inaccurate
25-09-2005

EVALUATION Typo only- not a spec change. ###@###.### 2005-07-13 20:55:45 GMT
13-07-2005