You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume, that m-pmd-p doesn't provide the Java Runtime for the auxclasspath and we fall back to load java classfiles from the current runtime, which is Java 22 and we can't read the classfiles (Unsupported class file major version 66). This can be worked around by overriding the asm dependency for m-pmd-p:
However, I didn't add a profile or so, as once PMD 7.0.0 is released, this problem is gone.
In order to make the combination work (Running PMD with Java 22, analyzing source code for Java 8) through maven-pmd-plugin, we probably need to enhance the plugin to provide one more option to explicitly configure the Java Runtime classpath for auxclasspath/type resolution. I'm pretty sure, it would work when configuring Java 8 via toolchains (but then PMD would be executed with Java 8).
OpenJDK 22 GA is scheduled for 2024/03/19.
The following JEPs are important for us:
In summary: https://javaalmanac.io/jdk/22/
This issue is similar to the previous: #4583
EA Release of JDK22 is available here: https://jdk.java.net/22/
Tasks:
net.sourceforge.pmd.lang.java.JavaLanguageModule
net.sourceforge.pmd.lang.java.LanguageVersionTest
net.sourceforge.pmd.lang.java.JavaLanguageModuleTest#previewVersionShouldBeGreaterThanNonPreview
net.sourceforge.pmd.lang.java.JavaLanguageModule
net.sourceforge.pmd.lang.java.LanguageVersionTest
net.sourceforge.pmd.lang.java.ast.Java20PreviewTreeDumpTest
(including resources)as this is a LTS versionThe text was updated successfully, but these errors were encountered: