Commit fc2fa0be authored by Remi Forax's avatar Remi Forax
Browse files

Merge branch 'update-to-java-13' into 'master'

add a new version V_13

See merge request !244
parents f901aef8 1ebe8675
Pipeline #4323 passed with stage
in 11 minutes and 6 seconds
......@@ -88,6 +88,7 @@ public class ASMifier extends Printer {
classVersions.put(Opcodes.V10, "V10");
classVersions.put(Opcodes.V11, "V11");
classVersions.put(Opcodes.V12, "V12");
classVersions.put(Opcodes.V13, "V13");
CLASS_VERSIONS = Collections.unmodifiableMap(classVersions);
}
......
......@@ -179,7 +179,7 @@ public class ClassReader {
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.V12) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V13) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
......
......@@ -64,6 +64,7 @@ public interface Opcodes {
int V10 = 0 << 16 | 54;
int V11 = 0 << 16 | 55;
int V12 = 0 << 16 | 56;
int V13 = 0 << 16 | 57;
/**
* Version flag indicating that the class is using 'preview' features.
......
......@@ -188,6 +188,7 @@ public class ConstantsTest {
case "V10":
case "V11":
case "V12":
case "V13":
return ConstantType.CLASS_VERSION;
case "ACC_PUBLIC":
case "ACC_PRIVATE":
......
Supports Markdown
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