Bug 100396 - JDT does not allow the developer to specify the enhanced for loop as an error
Summary: JDT does not allow the developer to specify the enhanced for loop as an error
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 3.1 RC3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-16 09:50 EDT by Fernando Kronbauer CLA
Modified: 2005-06-16 10:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Kronbauer CLA 2005-06-16 09:50:42 EDT
JDT does not allow the developer to specify the enhanced for loop as an error.

When developing code compatible with Java 1.4, enhanced for loops should be
treated as errors. In the compiler's property, JDT allows to configure
autoboxing/unboxing as compiler errors, but the same is not true for enhanced
for loops. Please add this option to the Java->Compiler->Error/Warnings->J2SE
5.0 options tab.
Comment 1 Philipe Mulet CLA 2005-06-16 10:16:13 EDT
Simply set source level to 1.4, and all 1.5 features will be rejected.