| Summary: | Unboxing warning is not reported when using enhanced 'for' (foreach) on Iterable | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ben Davis <entheh> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | srikanth_sankaran |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
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 :) |
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.)