Skip to content

Commit f835797

Browse files
committed
Update to be able to generate JDK 10 compatible classfile (54).
There is no new feature, the number is just incremented so the association between a JDK version and a classfile version is monotonic.
1 parent 2d57c02 commit f835797

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ public void visit(
199199
case Opcodes.V9:
200200
buf.append("V9");
201201
break;
202+
case Opcodes.V10:
203+
buf.append("V10");
204+
break;
202205
default:
203206
buf.append(version);
204207
break;

asm/src/main/java/org/objectweb/asm/ClassReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public ClassReader(
435435
this.b = byteBuffer;
436436
// Check the class' major_version. This field is after the magic and minor_version fields, which
437437
// use 4 and 2 bytes respectively.
438-
if (readShort(classFileOffset + 6) > Opcodes.V9) {
438+
if (readShort(classFileOffset + 6) > Opcodes.V10) {
439439
throw new IllegalArgumentException();
440440
}
441441
// Create the constant pool arrays. The constant_pool_count field is after the magic,

asm/src/main/java/org/objectweb/asm/Opcodes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public interface Opcodes {
5858
int V1_7 = 0 << 16 | 51;
5959
int V1_8 = 0 << 16 | 52;
6060
int V9 = 0 << 16 | 53;
61+
int V10 = 0 <<16 | 54;
6162

6263
// Access flags values, defined in
6364
// - https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1

0 commit comments

Comments
 (0)