Running "jar --validate --file JAR-FILE" may lead to "java.lang.UnsupportedOperationException: This feature requires ASM..." exceptions. Find details in stack trace attached at the end of this description.
The underlying reason is a usage of "Opcodes.ASM7" in the sun.tools.jar.FingerPrint class.
Find a minimal reproducer at https://github.com/sormuras/JDK-8282446
{{
java.lang.UnsupportedOperationException: This feature requires ASM9_EXPERIMENTAL
at java.base/jdk.internal.org.objectweb.asm.ClassVisitor.visitPermittedSubclassExperimental(ClassVisitor.java:299)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:715)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:432)
at jdk.jartool/sun.tools.jar.FingerPrint.getClassAttributes(FingerPrint.java:165)
at jdk.jartool/sun.tools.jar.FingerPrint.<init>(FingerPrint.java:81)
}}
{{
java.lang.UnsupportedOperationException: This feature requires ASM8
at java.base/jdk.internal.org.objectweb.asm.ClassVisitor.visitRecordComponent(ClassVisitor.java:338)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.readRecordComponent(ClassReader.java:962)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:740)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:432)
at jdk.jartool/sun.tools.jar.FingerPrint.getClassAttributes(FingerPrint.java:165)
at jdk.jartool/sun.tools.jar.FingerPrint.<init>(FingerPrint.java:81)
}}
The underlying reason is a usage of "Opcodes.ASM7" in the sun.tools.jar.FingerPrint class.
Find a minimal reproducer at https://github.com/sormuras/JDK-8282446
{{
java.lang.UnsupportedOperationException: This feature requires ASM9_EXPERIMENTAL
at java.base/jdk.internal.org.objectweb.asm.ClassVisitor.visitPermittedSubclassExperimental(ClassVisitor.java:299)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:715)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:432)
at jdk.jartool/sun.tools.jar.FingerPrint.getClassAttributes(FingerPrint.java:165)
at jdk.jartool/sun.tools.jar.FingerPrint.<init>(FingerPrint.java:81)
}}
{{
java.lang.UnsupportedOperationException: This feature requires ASM8
at java.base/jdk.internal.org.objectweb.asm.ClassVisitor.visitRecordComponent(ClassVisitor.java:338)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.readRecordComponent(ClassReader.java:962)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:740)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:432)
at jdk.jartool/sun.tools.jar.FingerPrint.getClassAttributes(FingerPrint.java:165)
at jdk.jartool/sun.tools.jar.FingerPrint.<init>(FingerPrint.java:81)
}}
- is blocked by
-
JDK-8282508 Updating ASM to 9.2 for JDK 19
- Resolved
- links to