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

Closes gh-31929
This commit is contained in:
Juergen Hoeller 2023-12-31 13:29:50 +01:00
parent 243ec88e95
commit 174eae377f
6 changed files with 66 additions and 68 deletions

View File

@ -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.V22) {
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V23) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
@ -1495,10 +1495,7 @@ public class ClassReader {
// Visit the RuntimeInvisibleParameterAnnotations attribute.
if (runtimeInvisibleParameterAnnotationsOffset != 0) {
readParameterAnnotations(
methodVisitor,
context,
runtimeInvisibleParameterAnnotationsOffset,
/* visible = */ false);
methodVisitor, context, runtimeInvisibleParameterAnnotationsOffset, /* visible= */ false);
}
// Visit the non standard attributes.

View File

@ -287,6 +287,7 @@ public interface Opcodes {
int V20 = 0 << 16 | 64;
int V21 = 0 << 16 | 65;
int V22 = 0 << 16 | 66;
int V23 = 0 << 16 | 67;
/**
* Version flag indicating that the class is using 'preview' features.