Community
Participate
Working Groups
With the java compiler compliance level set to 5.0, Eclipse doesn't complain when I use java.lang.String.isEmpty(), which is only available in java 6.
I don't think there is any way for the compiler to know that a method was added in Java 5 or Java 6.
The compiler is using the libraries that you set up on the classpath. So if you are setting the compliance to 1.5, you should use 1.5 libraries. The @since information is not stored in the .class files, so there is no way for the compiler to retrieve this information from the binaries themselves.
Like the -source flag in javac, the compiler compliance level dictates only which Java language features are used. It has no effect on available APIs.
Closing as INVALID since the described problem is not a bug
*** Bug 252220 has been marked as a duplicate of this bug. ***
Verified for 3.5M4