Bug 252220 - Setting compiler level to 1.5 does not block access to Java6 methods
Summary: Setting compiler level to 1.5 does not block access to Java6 methods
Status: VERIFIED DUPLICATE of bug 231260
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-27 12:20 EDT by Mark Swanson CLA
Modified: 2008-12-09 04:42 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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