A fix to watch: JDK-6260652: (coll) Arrays.asList(x).toArray().getClass() should be Object[].class

joe darcy joe.darcy at oracle.com
Wed Aug 12 16:53:48 UTC 2015


FYI,

As of build 73, the following change has been present in JDK 9:

     JDK-6260652: (coll) Arrays.asList(x).toArray().getClass() should be 
Object[].class
     https://bugs.openjdk.java.net/browse/JDK-6260652

As the summary implies, the long-standing behavior of 
Arrays.asList(x).toArray() was changed from returning a clone of the 
backing array, which might be say, a String[], to returning the 
specified type, Object[].

As early users of JDK 9, please be aware of this change and report on 
experiences using it.

Thanks,

-Joe


More information about the jdk9-dev mailing list