Community
Participate
Working Groups
Broken since 4.13. 1. Start new workspace with Java 11 2. Create a Java project where you set the execution environment to JavaSE-1.8 ==> expected warning is not shown The EE preference page correctly shows that the JRE is not strictly compatible. Most likely caused by fix for bug 548218.
For clarification: - in your case do you use --release? - where do you expect a warning? - in the new project wizard? - in the compiler properties page? - in the Problems view?
(In reply to Stephan Herrmann from comment #1) > For clarification: > - in your case do you use --release? I use exactly the provided steps. By default --release is disabled. > - where do you expect a warning? > - in the new project wizard? > - in the compiler properties page? > - in the Problems view? The warning is expected on the project and hence also in the problems view. You can try 4.12 to see how it must work.
I am able to reproduce the issue. org.eclipse.jdt.internal.launching.EECompilationParticipant.isReleaseFlagEnabled(String, String, IJavaProject) -> String releaseVal = project.getOption(JavaCore.COMPILER_RELEASE, true); Returns enabled even if the the --release option is not set in the UI.
Adding Manoj and Jay!
Vikas has agreed to take a look from Core perspective. Thanks Vikas!
New Gerrit change created: https://git.eclipse.org/r/157713
Gerrit change https://git.eclipse.org/r/157713 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=4924ffc59a70d3548ffaab13156792196bcc4bff
Thanks Vikas and Kalyan! Issue: There is no default value for release option for Java 8 and below so JDT core looks upward and finds --release set at Workspace level as the workspace was launched with Java 11. Profile from OSGI does not have Release property, Launching adds this property as "Disabled" so that JDT Core does not look up in the chain.
Verified with eclipse-SDK-I20200215-1800-win32-x86_64.
The fix is just fixing the example scenario from comment 0 (and maybe some more). Build: I20200218-1800. 1. Start new workspace with Java 13 2. Create a Java project where you set the execution environment to JavaSE-11 ==> expected warning is not shown The next fix needs to be tested with different combination of JRE and EE.
(In reply to Dani Megert from comment #10) My bad. With Java 13 we create the project with enabled --release option. Hence no warning needs to be issued. Marked comment 10 as obsolete.