From 8802a6ce9218db70921210041edc4afc5ba7191f Mon Sep 17 00:00:00 2001 From: forax Date: Tue, 24 Dec 2019 18:26:30 +0100 Subject: [PATCH] update to support V15 --- asm/src/main/java/org/objectweb/asm/ClassReader.java | 2 +- asm/src/main/java/org/objectweb/asm/Opcodes.java | 1 + asm/src/test/java/org/objectweb/asm/ConstantsTest.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/asm/src/main/java/org/objectweb/asm/ClassReader.java b/asm/src/main/java/org/objectweb/asm/ClassReader.java index f883322cb..6162d373e 100644 --- a/asm/src/main/java/org/objectweb/asm/ClassReader.java +++ b/asm/src/main/java/org/objectweb/asm/ClassReader.java @@ -191,7 +191,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.V14) { + if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V15) { 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 450839e64..2c8a680a7 100644 --- a/asm/src/main/java/org/objectweb/asm/Opcodes.java +++ b/asm/src/main/java/org/objectweb/asm/Opcodes.java @@ -278,6 +278,7 @@ public interface Opcodes { int V12 = 0 << 16 | 56; int V13 = 0 << 16 | 57; int V14 = 0 << 16 | 58; + int V15 = 0 << 16 | 59; /** * 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 ae81771f1..a173f099a 100644 --- a/asm/src/test/java/org/objectweb/asm/ConstantsTest.java +++ b/asm/src/test/java/org/objectweb/asm/ConstantsTest.java @@ -243,6 +243,7 @@ public class ConstantsTest { case "V12": case "V13": case "V14": + case "V15": return ConstantType.CLASS_VERSION; case "ACC_PUBLIC": case "ACC_PRIVATE": -- GitLab