-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
P4
-
None
-
Affects Version/s: 5.0
-
Component/s: core-libs
-
x86
-
windows_2000
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Suppose l is a List known to contain only strings. The following code can be used to dump the list into a newly allocated array of String:
String[] x = (String[]) v.toArray(new String[0]);
-> should be
String[] x = (String[]) l.toArray(new String[0]);
REPRODUCIBILITY :
This bug can be reproduced always.
###@###.### 2005-04-20 09:03:22 GMT
A DESCRIPTION OF THE PROBLEM :
Suppose l is a List known to contain only strings. The following code can be used to dump the list into a newly allocated array of String:
String[] x = (String[]) v.toArray(new String[0]);
-> should be
String[] x = (String[]) l.toArray(new String[0]);
REPRODUCIBILITY :
This bug can be reproduced always.
###@###.### 2005-04-20 09:03:22 GMT
- duplicates
-
JDK-4838705 (coll spec) Bug in "toArray" example for Interface "Collection"
-
- Resolved
-