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.