Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 537348

Summary: [12][batch][compiler] Adjust to removal of support for for 6/1.6 source and target
Product: [Eclipse Project] JDT Reporter: Manoj N Palat <manoj.palat>
Component: UIAssignee: Kalyan Prasad Tatavarthi <kalyan_prasad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, jarthana
Version: 4.9   
Target Milestone: BETA J12   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/138639
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=6890a2a08b06d4d9f5760cf068d2f6afa815aaf9
Whiteboard:
Bug Depends on:    
Bug Blocks: 536055, 545120    

Description Manoj N Palat CLA 2018-07-24 13:15:01 EDT
See https://bugs.openjdk.java.net/browse/JDK-8028563
Comment 1 Jay Arthanareeswaran CLA 2018-07-24 13:29:22 EDT
A generic version of this is bug 536194. I don't think we must follow javac in this to be a compliant compiler.
Comment 2 Manoj N Palat CLA 2018-10-10 04:31:00 EDT
(In reply to Jay Arthanareeswaran from comment #1)
>I don't think we must follow javac
> in this to be a compliant compiler.

I agree. 
[Based on the following:
 This bug is based on the https://bugs.openjdk.java.net/browse/JDK-8028563 which is based on JEP 182 (http://openjdk.java.net/jeps/182). Quoting verbatim from the Section Motivation of that JEP, "The source and target options are not mandated by the Java SE specification and are provided for programmer convenience. ".
Hence it can be concluded that this is not part of specification.]
Comment 3 Dani Megert CLA 2018-10-15 11:52:55 EDT
Since we decided to continue to offer the support, the only thing we need to do is to adjust the --release option since Java 12 and beyond won't have the signatures for 1.6.

This affects the compiler options and the UI.
Comment 4 Manoj N Palat CLA 2019-02-19 22:25:56 EST
Note: As per http://mail.openjdk.java.net/pipermail/jdk-dev/2019-February/002639.html,"JDK includes a regression tests that explicitly 
checks that retired source versions are not supported" - to recheck that the specs do not mention anything and its just an implementation detail.
Comment 5 Jay Arthanareeswaran CLA 2019-03-12 02:31:39 EDT
(In reply to Dani Megert from comment #3)
> Since we decided to continue to offer the support, the only thing we need to
> do is to adjust the --release option since Java 12 and beyond won't have the
> signatures for 1.6.
> 
> This affects the compiler options and the UI.

With fix for bug 540922, command line compiler falls back to the next version, for e.g. if --release 1.6 is used, it will pick 1.7 as release.

For UI though, it picks what is selected in the UI and if that release is not found, it will throw an error and bail out of the compilation.

Adjusting the UI to disable 1.6 if JRE 12 is used should do the job.
Comment 6 Eclipse Genie CLA 2019-03-13 05:32:14 EDT
New Gerrit change created: https://git.eclipse.org/r/138639
Comment 7 Eclipse Genie CLA 2019-03-13 05:45:06 EDT
Gerrit change https://git.eclipse.org/r/138639 was merged to [BETA_JAVA_12].
Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=6890a2a08b06d4d9f5760cf068d2f6afa815aaf9