Open sdeleuze opened 2 weeks ago
Byte Buddy is used in a lot of tooling which normally needs to support older VMs, too. Not sure why the class data sharing excludes old class files, but for now I think the benefits of an old class file format out weight the negatives.
Would a multi-release JAR be a path out of this?
That would work, would however double the jar size. Possibly I could offer two artifacts. I will look into that.
Does class data sharing even support MR jars?
Yes, I got the confirmation from the Java Platform team that MR jars would solve this. See also the related issue https://bugs.openjdk.org/browse/JDK-8288334.
When running an application and Spring Boot 3.3 CDS support and Bytebuddy (typically Spring Data JPA applications like Petclinic), a lot of warnings are visible in the logs like
[warning][cds] Skipping net/bytebuddy/description/type/TypeDefinition: Old class has been linked
. I think this is due to the Java 6 baseline used by ByteBuddy, a Java 8 baseline would make ByteBuddy CDS compliant.