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

Dalibor Topic dalibor.topic at oracle.com
Wed Aug 12 22:42:32 UTC 2015


Thanks, Martijn - added: https://wiki.openjdk.java.net/display/Adoption/JDK+9+Outreach#JDK9Outreach-Arrays.asList%28x%29.toArray%28%29returnsObject[]

cheers,
dalibor topic

On 8/12/15 8:22 PM, Martijn Verburg wrote:
> ---------- Forwarded message ----------
> From: *joe darcy* <joe.darcy at oracle.com>
> Date: Wednesday, 12 August 2015
> Subject: A fix to watch: JDK-6260652: (coll)
> Arrays.asList(x).toArray().getClass() should be Object[].class
> To: "jdk9-dev at openjdk.java.net" <jdk9-dev at openjdk.java.net>
> 
> 
> 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
> 
> 
> 


-- 
Oracle <http://www.oracle.com>
Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961 <tel:+491737185961>
Oracle Java Platform Group

ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher 

Green Oracle <http://www.oracle.com/commitment> Oracle is committed to developing practices and products that help protect the environment


More information about the adoption-discuss mailing list