Browse Source

Upgrade to ASM 7.2

Closes gh-23156
pull/23247/head
Juergen Hoeller 7 years ago
parent
commit
6990504d17
  1. 2
      spring-core/src/main/java/org/springframework/asm/ClassReader.java
  2. 3
      spring-core/src/main/java/org/springframework/asm/MethodWriter.java
  3. 1
      spring-core/src/main/java/org/springframework/asm/Opcodes.java

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

@ -190,7 +190,7 @@ public class ClassReader {
this.b = classFileBuffer; this.b = classFileBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which // Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively. // use 4 and 2 bytes respectively.
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V13) { if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V14) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6)); "Unsupported class file major version " + readShort(classFileOffset + 6));
} }

3
spring-core/src/main/java/org/springframework/asm/MethodWriter.java

@ -775,6 +775,9 @@ final class MethodWriter extends MethodVisitor {
} }
visitFrameEnd(); visitFrameEnd();
} else { } else {
if (symbolTable.getMajorVersion() < Opcodes.V1_6) {
throw new IllegalArgumentException("Class versions V1_5 or less must use F_NEW frames.");
}
int offsetDelta; int offsetDelta;
if (stackMapTableEntries == null) { if (stackMapTableEntries == null) {
stackMapTableEntries = new ByteVector(); stackMapTableEntries = new ByteVector();

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

@ -269,6 +269,7 @@ public interface Opcodes {
int V11 = 0 << 16 | 55; int V11 = 0 << 16 | 55;
int V12 = 0 << 16 | 56; int V12 = 0 << 16 | 56;
int V13 = 0 << 16 | 57; int V13 = 0 << 16 | 57;
int V14 = 0 << 16 | 58;
/** /**
* Version flag indicating that the class is using 'preview' features. * Version flag indicating that the class is using 'preview' features.

Loading…
Cancel
Save