Bug 100396

Summary: JDT does not allow the developer to specify the enhanced for loop as an error
Product: [Eclipse Project] JDT Reporter: Fernando Kronbauer <fernando_kronbauer>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: critical    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC3   
Hardware: All   
OS: All   
Whiteboard:

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.