Bug 252220

Summary: Setting compiler level to 1.5 does not block access to Java6 methods
Product: [Eclipse Project] JDT Reporter: Mark Swanson <Mark.Swanson>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: david_audel, philippe_mulet, remy.suen
Version: 3.4.1   
Target Milestone: 3.5 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mark Swanson CLA 2008-10-27 12:20:25 EDT
Build ID: M20080911-1700

Steps To Reproduce:
1. Make JAVA_HOME a java6 jdk, select that in eclipse as jre
2. Set java compiler compliance level in Eclipse to 1.5
3. Write code to call String.isEmpty().  Works in Eclipse, will fail (to load) in target java5 environment


More information:
Comment 1 Philipe Mulet CLA 2008-10-27 13:16:51 EDT
This is not controlled by compliance level, but simply by the choice of the library you use on the classpath. If you develop for Java 5, you should point at a Java 5 library on your classpath.
Comment 2 Remy Suen CLA 2008-10-28 02:25:44 EDT
Sounds like bug 231260 though I'm surprised it hasn't been closed as yet.
Comment 3 Jerome Lanneluc CLA 2008-10-31 06:19:12 EDT
Thanks Remy. Will mark as a dup.
Comment 4 Jerome Lanneluc CLA 2008-10-31 06:19:35 EDT

*** This bug has been marked as a duplicate of bug 231260 ***
Comment 5 David Audel CLA 2008-12-09 04:42:29 EST
Verified for 3.5M4