Community
Participate
Working Groups
Build Identifier: I20100129-1300 for (int i:new HashSet<Integer>()) {} //Should warn but doesn't for (int i:new Integer[10]) {} //Warns as expected for (Integer i:new int[10]) {} //Warns as expected I'd expect an unboxing warning on the first line. Reproducible: Always Steps to Reproduce: 1. Make sure unboxing warnings are enabled. 2. Put the above code in a function in an editor. 3. Observe where the warnings are and aren't. (I didn't save the code for my test.)
Same as bug 322553 *** This bug has been marked as a duplicate of bug 322553 ***
Ah, sorry. I searched for 'unboxing' but not 'boxing'. Hopefully anyone else who does the same will find this bug :)