Community
Participate
Working Groups
Build Identifier: I20100608-0911 With Java5-style loops over collections wrapper types can be unboxed into primitive types. For example: void print(List<Integer> list) { for (int i : list) { // <-- Warning missing here System.out.println(i); } } If boxing warnings are enabled a warning should be issued in this situation. This was reported before in bug #85518 together with two other scenarios (with arrays instead of collections). The array case seems to be fixed. Reproducible: Always Steps to Reproduce: 1. Enable Compiler Warning "boxing and unboxing" conversions 2. Paste the following snippet into an Java editor void print(List<Integer> list) { for (int i : list) { // <-- Warning missing here System.out.println(i); } } 3. No warning is given at the line where the Integer elements of the list are unboxed into primitive int.
I'll investigate
*** Bug 349181 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.