-
Bug
-
Resolution: Fixed
-
P4
-
8
-
b35
-
Not verified
Collection.toArray(T[] ), plus from overriding classes, states:
* @throws ArrayStoreException if the runtime type of the specified array
* is not a supertype of the runtime type of every element in
* this collection
and Stream.toArray(IntFunction<A[]> ) state:
* @throws ArrayStoreException if the runtime type of the array returned
* from the array generator is not a supertype of the runtime type of every
* element in this stream
Rather than "runtime type" it should more accurately be "component type"
* @throws ArrayStoreException if the runtime type of the specified array
* is not a supertype of the runtime type of every element in
* this collection
and Stream.toArray(IntFunction<A[]> ) state:
* @throws ArrayStoreException if the runtime type of the array returned
* from the array generator is not a supertype of the runtime type of every
* element in this stream
Rather than "runtime type" it should more accurately be "component type"
- relates to
-
JDK-8160406 Collection.toArray() spec should be explicit about returning precisely an Object[]
-
- Closed
-