Commit 8802a6ce authored by forax's avatar forax

update to support V15

parent 8486f103
Pipeline #7439 passed with stage
in 10 minutes and 20 seconds
...@@ -191,7 +191,7 @@ public class ClassReader { ...@@ -191,7 +191,7 @@ public class ClassReader {
this.b = classFileBuffer; this.b = classFileBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which // Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively. // use 4 and 2 bytes respectively.
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V14) { if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V15) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6)); "Unsupported class file major version " + readShort(classFileOffset + 6));
} }
......
...@@ -278,6 +278,7 @@ public interface Opcodes { ...@@ -278,6 +278,7 @@ public interface Opcodes {
int V12 = 0 << 16 | 56; int V12 = 0 << 16 | 56;
int V13 = 0 << 16 | 57; int V13 = 0 << 16 | 57;
int V14 = 0 << 16 | 58; int V14 = 0 << 16 | 58;
int V15 = 0 << 16 | 59;
/** /**
* Version flag indicating that the class is using 'preview' features. * Version flag indicating that the class is using 'preview' features.
......
...@@ -243,6 +243,7 @@ public class ConstantsTest { ...@@ -243,6 +243,7 @@ public class ConstantsTest {
case "V12": case "V12":
case "V13": case "V13":
case "V14": case "V14":
case "V15":
return ConstantType.CLASS_VERSION; return ConstantType.CLASS_VERSION;
case "ACC_PUBLIC": case "ACC_PUBLIC":
case "ACC_PRIVATE": case "ACC_PRIVATE":
......
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