Skip to content

Commit

Permalink
Update to be able to generate JDK 10 compatible classfile (54).
Browse files Browse the repository at this point in the history
There is no new feature, the number is just incremented so the
association between a JDK version and a classfile version is monotonic.
  • Loading branch information
forax committed Dec 3, 2017
1 parent 2d57c02 commit f835797
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ public void visit(
case Opcodes.V9:
buf.append("V9");
break;
case Opcodes.V10:
buf.append("V10");
break;
default:
buf.append(version);
break;
Expand Down
2 changes: 1 addition & 1 deletion asm/src/main/java/org/objectweb/asm/ClassReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public ClassReader(
this.b = byteBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively.
if (readShort(classFileOffset + 6) > Opcodes.V9) {
if (readShort(classFileOffset + 6) > Opcodes.V10) {
throw new IllegalArgumentException();
}
// Create the constant pool arrays. The constant_pool_count field is after the magic,
Expand Down
1 change: 1 addition & 0 deletions asm/src/main/java/org/objectweb/asm/Opcodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public interface Opcodes {
int V1_7 = 0 << 16 | 51;
int V1_8 = 0 << 16 | 52;
int V9 = 0 << 16 | 53;
int V10 = 0 <<16 | 54;

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

0 comments on commit f835797

Please sign in to comment.