Bug 61260 - classfile conformance options broken for assert
Summary: classfile conformance options broken for assert
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-06 13:15 EDT by Jason Schroeder CLA
Modified: 2004-05-07 17:58 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 Jason Schroeder CLA 2004-05-06 13:15:58 EDT
Window>Preferences>Java>Compiler>Compliance and Classfiles

Outofthebox, "Compiler compliance level" is 1.4 but source files with assert
statements report errors.

But! when I specifically customize "Source compatibility" and "Generated .class
files compatibility" to 1.4 then the proper conformance behaviour happens.
Comment 1 Olivier Thomann CLA 2004-05-06 16:29:22 EDT
This works as designed. Compliance 1.4 means that the compiler "behaves" like
javac 1.4.
By default javac 1.4 doesn't compile assert statements. You need to specify
-source 1.4. This is done in Eclipse by changing the Source compatibility.
Because -source 1.4 means -target 1.4, in Eclipse you also need to change the
Generated .class
files compatibility to 1.4 and set assert as an identifier to Error.

Close as INVALID