Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Java 10 class file version 54. #4

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/scala/tools/asm/ClassReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public ClassReader(final byte[] b) {
public ClassReader(final byte[] b, final int off, final int len) {
this.b = b;
// checks the class version
if (readShort(off + 6) > Opcodes.V9) {
if (readShort(off + 6) > Opcodes.V10) {
throw new IllegalArgumentException();
}
// parses the constant pool
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/scala/tools/asm/Opcodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public interface Opcodes {
int V1_6 = 0 << 16 | 50;
int V1_7 = 0 << 16 | 51;
int V1_8 = 0 << 16 | 52;
int V9 = 0 << 16 | 53;
int V9 = 0 << 16 | 53;
int V10 = 0 << 16 | 54;

// access flags

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/scala/tools/asm/util/ASMifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ public void visit(final int version, final int access, final String name,
case Opcodes.V9:
buf.append("V9");
break;
case Opcodes.V10:
buf.append("V10");
break;
default:
buf.append(version);
break;
Expand Down