diff --git a/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java b/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java index 51134811c6798a735c4bcf544288736d38e52616..2d1966a5e2bc9368466707c8b92149d81c07d312 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java @@ -109,6 +109,7 @@ public class ASMifier extends Printer { classVersions.put(Opcodes.V17, "V17"); classVersions.put(Opcodes.V18, "V18"); classVersions.put(Opcodes.V19, "V19"); + classVersions.put(Opcodes.V20, "V20"); CLASS_VERSIONS = Collections.unmodifiableMap(classVersions); } diff --git a/asm/src/main/java/org/objectweb/asm/ClassReader.java b/asm/src/main/java/org/objectweb/asm/ClassReader.java index 413f2a1a323a760813f619eb4ae6c46357c4ca14..2a1139c3243a5b68b5617d2ffd88f214c2720956 100644 --- a/asm/src/main/java/org/objectweb/asm/ClassReader.java +++ b/asm/src/main/java/org/objectweb/asm/ClassReader.java @@ -194,7 +194,7 @@ public class ClassReader { this.b = classFileBuffer; // Check the class' major_version. This field is after the magic and minor_version fields, which // use 4 and 2 bytes respectively. - if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V19) { + if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V20) { throw new IllegalArgumentException( "Unsupported class file major version " + readShort(classFileOffset + 6)); } diff --git a/asm/src/main/java/org/objectweb/asm/Opcodes.java b/asm/src/main/java/org/objectweb/asm/Opcodes.java index c4d1679a62c28b5eb83db73eff83d4e85c75de54..4a85a445e1a00191919e9ca587ca13f685430a0c 100644 --- a/asm/src/main/java/org/objectweb/asm/Opcodes.java +++ b/asm/src/main/java/org/objectweb/asm/Opcodes.java @@ -285,6 +285,7 @@ public interface Opcodes { int V17 = 0 << 16 | 61; int V18 = 0 << 16 | 62; int V19 = 0 << 16 | 63; + int V20 = 0 << 16 | 64; /** * Version flag indicating that the class is using 'preview' features. diff --git a/asm/src/test/java/org/objectweb/asm/ConstantsTest.java b/asm/src/test/java/org/objectweb/asm/ConstantsTest.java index 8c2208618d86e0ffceb2be09053c2c5fb3878b08..f2ca92a2fddb8c5a488b393fdb533d2f599c787b 100644 --- a/asm/src/test/java/org/objectweb/asm/ConstantsTest.java +++ b/asm/src/test/java/org/objectweb/asm/ConstantsTest.java @@ -252,6 +252,7 @@ class ConstantsTest { case "V17": case "V18": case "V19": + case "V20": return ConstantType.CLASS_VERSION; case "ACC_PUBLIC": case "ACC_PRIVATE":