eclipse-ee4j / glassfish-hk2

Dynamic dependency injection framework
https://eclipse-ee4j.github.io/glassfish-hk2
Other
84 stars 55 forks source link

org.glassfish.hk2:class-model does not support Java 17 #779

Closed DevonMiller-tfo closed 1 year ago

DevonMiller-tfo commented 1 year ago

There are 4 classes in org.glassfish.hk2:class-model that are initializing ASM by calling super(Opcodes.ASM7). To support Java 17, these need to be passing Opcodes.ASM9.

The files are all in class-model/src/main/java/org/glassfish/hk2/classmodel/reflect/impl/:

Additionally there is a class in org.glassfish.hk2:hk2-testing that also in initializing for Java 11:

robelcik commented 1 year ago

Hello. A related HK2 2.x patch in Payara: https://github.com/payara/patched-src-hk2/commit/568abf93115b2d224dc24823ab2906d18b6f8b86

DevonMiller-tfo commented 1 year ago

It looks like there is a versioning issue. By version numbers, the latest hk2 is 3.0.1.payara-p1 and this is the one included in 6.2023.1. However, the build with the corrected ASM9 parameter is 2.6.1.payara-p7 which was built 6 months later.

dmatej commented 1 year ago

It looks like there is a versioning issue. By version numbers, the latest hk2 is 3.0.1.payara-p1 and this is the one included in 6.2023.1. However, the build with the corrected ASM9 parameter is 2.6.1.payara-p7 which was built 6 months later.

Those are just Payara distributions as they try to support newer JDKs also for older Payara distributions. I believe the @robelcik just wanted to show how to do it. Otherwise it would be nice if Payara would create the PR for the official Eclipse's HK2 distribution, but they don't do that much often now.

But you can create the PR on your own too, sooner than we would get to it ;-)

dmatej commented 1 year ago

https://asm.ow2.io/versions.html