jruby / jcodings

Java-based codings helper classes for Joni and JRuby
MIT License
21 stars 29 forks source link

Verify org.jruby.jcodings:jcodings:1.0.44 is JDK11 compatible #27

Closed AlexeyRedinskii closed 4 years ago

AlexeyRedinskii commented 5 years ago

Hello guys,

we are in the process of migrating from JDK8 to JDK11. Our internal tool says that org.jruby.jcodings:jcodings:1.0.44 is not not JDK11 compatible, because it uses covariant methods:

This project contains references to covariant Java API methods that are not provided in JDK 8.

Incompatible bytecode compiled with JDK 9+ may throw a java.lang.NoSuchMethodError when running on JDK 8. An example are implementations of java.nio.Buffer.

Ensure that bytecode compiled to run on JDK 8 uses the -release 8 option. Bytecode built using compiler options -source 1.8 and -target 1.8 do not ensure compatible bytecode.

NoSuchMethodError exceptions may also be mitigated by up casting types such as: ((Buffer) charBuffer).flip()

Could you please verify/release a new version that is JDK11 compatible?

AlexeyRedinskii commented 5 years ago

@lopex @headius please ^

lopex commented 5 years ago

Does maven-release-plugin have an option for -release 8 ?

ahorek commented 4 years ago

@lopex yes https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html

there's also a way how to fix it without setting compatibility flags, see https://github.com/headius/backport9

headius commented 4 years ago

I actually fixed this for my GraalVM experiments. Pushing release now. Sorry for delay!

headius commented 4 years ago

BTW, what tool is that?

headius commented 4 years ago

Release 1.0.45 should be out there now!