JDK-8223553 : Fix code constructs that do not compile with the Eclipse Java Compiler
  • Type: Bug
  • Component: core-libs
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-08
  • Updated: 2020-04-08
  • Resolved: 2019-05-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.5Fixed 13 b23Fixed
Related Reports
Relates :  
Relates :  
Description
There are some code constructs in the JDK that compile with javac but would not compile with the Eclipse Compiler (EC4J).

It seems they benefit from some widening of capture vars, which is observed in javac but violates the spec. There is an open issue for this:
https://bugs.openjdk.java.net/browse/JDK-8016207

It has been brought up on the compiler-dev mailing list (https://mail.openjdk.java.net/pipermail/compiler-dev/2019-March/013054.html) but there has not been a reaction.

So I suggest to fix up the coding to quiesce the errors observed when working on OpenJDK in the Eclipse IDE. 

Comments
Fix Request: I request backport to jdk11u to support working with Eclipse IDE in that context, too. The fix is low risk. Unfortunately, it doesn't apply cleanly because of some diffs in the import statements of HTTPExchangeImpl. I started a review here: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-May/001194.html
24-05-2019

Core-libs-dev review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2019-May/060066.html It's not entirely clear whether this is really a bug in Eclipse or in javac or in the JLS. The relevant Eclipse bug is: https://bugs.eclipse.org/bugs/show_bug.cgi?id=530236. This in turn refers to javac (and possible JLS) bug JDK-8016207.
23-05-2019