Commit d0afe0cd authored by Remi Forax's avatar Remi Forax

Merge branch 'bump-version-support-to-12' into 'master'

Bump supported class version to V_12 (56)

See merge request asm/asm!187
parents 9a421251 c7308027
......@@ -80,6 +80,7 @@ public class ASMifier extends Printer {
classVersions.put(Opcodes.V9, "V9");
classVersions.put(Opcodes.V10, "V10");
classVersions.put(Opcodes.V11, "V11");
classVersions.put(Opcodes.V12, "V12");
CLASS_VERSIONS = Collections.unmodifiableMap(classVersions);
}
......
......@@ -171,7 +171,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.V11) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V12) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
......
......@@ -69,6 +69,7 @@ public interface Opcodes {
int V9 = 0 << 16 | 53;
int V10 = 0 << 16 | 54;
int V11 = 0 << 16 | 55;
int V12 = 0 << 16 | 56;
/**
* Version flag indicating that the class is using 'preview' features.
......
......@@ -79,6 +79,7 @@ public class ConstantsTest {
case "V9":
case "V10":
case "V11":
case "V12":
assertFalse(classVersions.contains(field.getInt(null)));
classVersions.add(field.getInt(null));
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment