6260652: (coll) Arrays.asList(x).toArray().getClass() should be Object[].class

Return Arrays.copyOf(a, a.length, Object[].class)

Reviewed-by: igerasim, psandoz
This commit is contained in:
Martin Buchholz 2015-06-29 15:02:35 -07:00
parent 99f867bded
commit 57996d703c
6 changed files with 10 additions and 12 deletions

View file

@ -3820,7 +3820,7 @@ public class Arrays {
@Override
public Object[] toArray() {
return a.clone();
return Arrays.copyOf(a, a.length, Object[].class);
}
@Override