Browse Source

Upgrade to ASM master (including early support for Java 18 bytecode)

Closes gh-27069
pull/27100/head
Juergen Hoeller 5 years ago
parent
commit
edf0343cfe
  1. 2
      spring-core/src/main/java/org/springframework/asm/ClassReader.java
  2. 4
      spring-core/src/main/java/org/springframework/asm/ClassVisitor.java
  3. 1
      spring-core/src/main/java/org/springframework/asm/Opcodes.java

2
spring-core/src/main/java/org/springframework/asm/ClassReader.java

@ -194,7 +194,7 @@ public class ClassReader { @@ -194,7 +194,7 @@ public class ClassReader {
this.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.V17) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V18) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}

4
spring-core/src/main/java/org/springframework/asm/ClassVisitor.java

@ -30,8 +30,8 @@ package org.springframework.asm; @@ -30,8 +30,8 @@ package org.springframework.asm;
/**
* A visitor to visit a Java class. The methods of this class must be called in the following order:
* {@code visit} [ {@code visitSource} ] [ {@code visitModule} ][ {@code visitNestHost} ][ {@code
* visitPermittedSubclass} ][ {@code visitOuterClass} ] ( {@code visitAnnotation} | {@code
* visitTypeAnnotation} | {@code visitAttribute} )* ( {@code visitNestMember} | {@code
* visitOuterClass} ] ( {@code visitAnnotation} | {@code visitTypeAnnotation} | {@code
* visitAttribute} )* ( {@code visitNestMember} | [ {@code * visitPermittedSubclass} ] | {@code
* visitInnerClass} | {@code visitRecordComponent} | {@code visitField} | {@code visitMethod} )*
* {@code visitEnd}.
*

1
spring-core/src/main/java/org/springframework/asm/Opcodes.java

@ -282,6 +282,7 @@ public interface Opcodes { @@ -282,6 +282,7 @@ public interface Opcodes {
int V15 = 0 << 16 | 59;
int V16 = 0 << 16 | 60;
int V17 = 0 << 16 | 61;
int V18 = 0 << 16 | 62;
/**
* Version flag indicating that the class is using 'preview' features.

Loading…
Cancel
Save