Ivan, Thanks for reminding me that I had already written a test for this, back before the beginning of time.
Webrev updated. On Sat, Jun 27, 2015 at 6:43 AM, Ivan Gerasimov <ivan.gerasi...@oracle.com> wrote: > Hi Martin! > > Would it make sense to add a simple regression test with this fix? > > I guess, something like the following should suffice: > > -------------------------------- > import java.util.Arrays; > public class Test { > public static void main(String[] args) throws Throwable { > Arrays.asList(new String[] {"42"}).toArray(new Object[0])[0] = new > Integer(42); > Arrays.asList(new String[] {"42"}).toArray()[0] = new Integer(42); > } > } > -------------------------------- > > Sincerely yours, > Ivan > > On 27.06.2015 0:54, Martin Buchholz wrote: > >> 10 years later ... still asking for approval to commit. >> >> https://bugs.openjdk.java.net/browse/JDK-6260652 >> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/Arrays.asList.toArray/ >> < >> http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/Arrays.asList.toArray/ >> > >> > >