This program: import java.util.*; import java.util.concurrent.*; public class Bug { public static void main(String[] args) throws Throwable { Collection<Integer> c = new LinkedBlockingQueue<Integer>(); Integer[] a = new Integer[1]; a[0] = 42; System.out.println(c.toArray(a)[0]); } } should print "null", but actually prints 42.
|