RFR: 8223553: Fix code constructs that do not compile with the Eclipse Java Compiler

Langer, Christoph christoph.langer at sap.com
Wed May 8 08:02:58 UTC 2019


please review a small change that I'd like to see in OpenJDK to get rid of compilation errors in the Eclipse IDE.

It seems the root cause for the compilation errors is that javac would sometimes widen capture variables and is hence able to compile the places that I touch here. The EC4J compiler claims that it's following the spec more strictly and bails out at these places. I had posted about this on compiler-dev but got no reaction [0].

So, as this seems to be some field of open work for the compiler/spec folks, I'd like to get EC4J quiesced by introducing some slight modifications to the original places which makes the code appeal a bit less elegant and fluent but will get rid of the compile errors.

Please review:
Bug: https://bugs.openjdk.java.net/browse/JDK-8223553
Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8223553.0/

The modification to src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java belongs to JSR-166, so I don't know if it needs some special handling.

Thanks & Best regards

[0] https://mail.openjdk.java.net/pipermail/compiler-dev/2019-March/013054.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20190508/7d78887e/attachment.html>

More information about the compiler-dev mailing list