Summary: | When JDK Compliance 1.5 and JRE is Java 6, Java 6 only functions are allowed | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Stephen McCants <smccants> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | VERIFIED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | bhunt, Olivier_Thomann |
Version: | 3.5 | ||
Target Milestone: | 3.5 RC2 | ||
Hardware: | PC | ||
OS: | Linux-GTK | ||
Whiteboard: |
Description
Stephen McCants
2009-05-11 15:00:04 EDT
The compiler is using what is available on the classpath. There is no validation of method, types, fields to check if they match the corresponding compliance. If you want that check to be done, you can set up your bundle to use API Tooling and active the library usage compatibility. (In reply to comment #1) > The compiler is using what is available on the classpath. There is no > validation of method, types, fields to check if they match the corresponding > compliance. > If that is the case, then what is the JDK Compliance preference for? JDK compliance indicates how the compiler is behaving. Compliance 1.3 means that the eclipse compiler behaves (name lookup, declaring class for method invocations, ...) like javac 1.3. Compliance 1.4 => behaves like javac 1.4, ... In term of library usage, the eclipse compiler is using the libraries on the classpath. In your case you explicitly set the library to be 1.6 libraries even if the compliance is 1.5. Closing as INVALID as this is working as designed. Verified for 3.5RC2 using I20090521-2000. |