diff --git a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicInterpreter.java b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicInterpreter.java index a4d4cf5be4321ce8bae8305e9b36d26c19ba67af..e82b291360b6bdaac43ecfbbf5eda97535d17059 100644 --- a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicInterpreter.java +++ b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicInterpreter.java @@ -61,7 +61,7 @@ public class BasicInterpreter extends Interpreter implements Opcodes * version. */ public BasicInterpreter() { - super(ASM6); + super(ASM7); if (getClass() != BasicInterpreter.class) { throw new IllegalStateException(); } @@ -72,7 +72,7 @@ public class BasicInterpreter extends Interpreter implements Opcodes * * @param api the ASM API version supported by this interpreter. Must be one of {@link * org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link - * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}. + * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}. */ protected BasicInterpreter(final int api) { super(api); diff --git a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicVerifier.java b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicVerifier.java index 850c3de6a3ef7174aad41ec683a6b7ccb117ad75..b9a1ac192d047607e89d102ecb2e3363bb105fb8 100644 --- a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicVerifier.java +++ b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/BasicVerifier.java @@ -47,7 +47,7 @@ public class BasicVerifier extends BasicInterpreter { * use this constructor. Instead, they must use the {@link #BasicVerifier(int)} version. */ public BasicVerifier() { - super(ASM6); + super(ASM7); if (getClass() != BasicVerifier.class) { throw new IllegalStateException(); } @@ -58,7 +58,7 @@ public class BasicVerifier extends BasicInterpreter { * * @param api the ASM API version supported by this interpreter. Must be one of {@link * org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link - * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}. + * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}. */ protected BasicVerifier(final int api) { super(api); diff --git a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Interpreter.java b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Interpreter.java index eb8d1bb398d2db52768e1fb58f150af31bdb98af..4e9a65e1b82e9b49f9a8aaaccf0f1e5a0cf47c22 100644 --- a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Interpreter.java +++ b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Interpreter.java @@ -47,7 +47,7 @@ public abstract class Interpreter { /** * The ASM API version supported by this interpreter. The value of this field must be one of * {@link org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link - * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}. + * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}. */ protected final int api; @@ -56,7 +56,7 @@ public abstract class Interpreter { * * @param api the ASM API version supported by this interpreter. Must be one of {@link * org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link - * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}. + * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}. */ protected Interpreter(final int api) { this.api = api; diff --git a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SimpleVerifier.java b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SimpleVerifier.java index 430d0f5d4fb7aa0e0bccef49f5f8820917d8ed82..1cea23799863ff59b27e4e6fefd722b98001e490 100644 --- a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SimpleVerifier.java +++ b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SimpleVerifier.java @@ -93,7 +93,7 @@ public class SimpleVerifier extends BasicVerifier { final Type currentSuperClass, final List currentClassInterfaces, final boolean isInterface) { - this(ASM6, currentClass, currentSuperClass, currentClassInterfaces, isInterface); + this(ASM7, currentClass, currentSuperClass, currentClassInterfaces, isInterface); if (getClass() != SimpleVerifier.class) { throw new IllegalStateException(); } @@ -105,7 +105,7 @@ public class SimpleVerifier extends BasicVerifier { * * @param api the ASM API version supported by this verifier. Must be one of {@link * org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link - * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}. + * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}. * @param currentClass the type of the class to be verified. * @param currentSuperClass the type of the super class of the class to be verified. * @param currentClassInterfaces the types of the interfaces directly implemented by the class to diff --git a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SourceInterpreter.java b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SourceInterpreter.java index 3aeb01b7483c1466a4d56211e29f7057dfe4df06..6a765e2ac5a09b7c2b17e2f5d37eab89446d8735 100644 --- a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SourceInterpreter.java +++ b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/SourceInterpreter.java @@ -51,7 +51,7 @@ public class SourceInterpreter extends Interpreter implements Opcod * version. */ public SourceInterpreter() { - super(ASM6); + super(ASM7); if (getClass() != SourceInterpreter.class) { throw new IllegalStateException(); } @@ -62,7 +62,7 @@ public class SourceInterpreter extends Interpreter implements Opcod * * @param api the ASM API version supported by this interpreter. Must be one of {@link * org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link - * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}. + * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}. */ protected SourceInterpreter(final int api) { super(api); diff --git a/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/BasicInterpreterTest.java b/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/BasicInterpreterTest.java index 45e56a3ca1e087cdb30ce4f289f3231fa38e647e..60dd8f9576b4b2acb16715d853d999862a23b256 100644 --- a/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/BasicInterpreterTest.java +++ b/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/BasicInterpreterTest.java @@ -89,7 +89,7 @@ public class BasicInterpreterTest extends AsmTest { for (MethodNode methodNode : classNode.methods) { Analyzer analyzer = new Analyzer( - new BasicInterpreter(Opcodes.ASM7_EXPERIMENTAL) { + new BasicInterpreter(Opcodes.ASM7) { @Override public BasicValue merge(final BasicValue value1, final BasicValue value2) { return new BasicValue(super.merge(value1, value2).getType()); diff --git a/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/SimpleVerifierTest.java b/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/SimpleVerifierTest.java index 367bbebf2c3fcf3272a1b0c8ea3ab4cb97429009..4ea7e1482b085fb0dc2aa25a4377888791099f53 100644 --- a/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/SimpleVerifierTest.java +++ b/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/SimpleVerifierTest.java @@ -497,8 +497,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes { Type baseType = Type.getObjectType("C"); Type superType = Type.getObjectType("D"); Type interfaceType = Type.getObjectType("I"); - new SimpleVerifier( - ASM7_EXPERIMENTAL, baseType, superType, Arrays.asList(interfaceType), false) { + new SimpleVerifier(ASM7, baseType, superType, Arrays.asList(interfaceType), false) { void test() { assertTrue(isAssignableFrom(baseType, baseType)); @@ -516,7 +515,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes { } }.test(); - new SimpleVerifier(ASM7_EXPERIMENTAL, interfaceType, null, null, true) { + new SimpleVerifier(ASM7, interfaceType, null, null, true) { void test() { assertTrue(isAssignableFrom(interfaceType, baseType)); diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/AdviceAdapter.java b/asm-commons/src/main/java/org/objectweb/asm/commons/AdviceAdapter.java index dfc81f17d9558fd1425ba12a60345e3d99278fd7..fac0a08e26dd9b300495515c045c2feb49e90993 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/AdviceAdapter.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/AdviceAdapter.java @@ -97,8 +97,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes * Constructs a new {@link AdviceAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param methodVisitor the method visitor to which this adapter delegates calls. * @param access the method's access flags (see {@link Opcodes}). * @param name the method's name. diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/AnalyzerAdapter.java b/asm-commons/src/main/java/org/objectweb/asm/commons/AnalyzerAdapter.java index b16c151f342597271f542c77fb3025062caf4946..7c4eb330acaf17877fa45278a95fd5c9949f0b64 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/AnalyzerAdapter.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/AnalyzerAdapter.java @@ -116,7 +116,7 @@ public class AnalyzerAdapter extends MethodVisitor { final String name, final String descriptor, final MethodVisitor methodVisitor) { - this(Opcodes.ASM6, owner, access, name, descriptor, methodVisitor); + this(Opcodes.ASM7, owner, access, name, descriptor, methodVisitor); if (getClass() != AnalyzerAdapter.class) { throw new IllegalStateException(); } @@ -126,8 +126,7 @@ public class AnalyzerAdapter extends MethodVisitor { * Constructs a new {@link AnalyzerAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param owner the owner's class name. * @param access the method's access flags (see {@link Opcodes}). * @param name the method's name. diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/AnnotationRemapper.java b/asm-commons/src/main/java/org/objectweb/asm/commons/AnnotationRemapper.java index 12523f0a095dd109f3c53a9922c5802dc670926d..fd86b455a15d13b99348b7a21bab1e09d3fcb5cf 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/AnnotationRemapper.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/AnnotationRemapper.java @@ -49,7 +49,7 @@ public class AnnotationRemapper extends AnnotationVisitor { * @param remapper the remapper to use to remap the types in the visited annotation. */ public AnnotationRemapper(final AnnotationVisitor annotationVisitor, final Remapper remapper) { - this(Opcodes.ASM6, annotationVisitor, remapper); + this(Opcodes.ASM7, annotationVisitor, remapper); } /** diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/ClassRemapper.java b/asm-commons/src/main/java/org/objectweb/asm/commons/ClassRemapper.java index 18251dc2551a62c21960d4722499ff400a49caf5..ec75a1d17df81e6ad48e3794cb3be9b80258d528 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/ClassRemapper.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/ClassRemapper.java @@ -59,7 +59,7 @@ public class ClassRemapper extends ClassVisitor { * @param remapper the remapper to use to remap the types in the visited class. */ public ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper) { - this(Opcodes.ASM6, classVisitor, remapper); + this(Opcodes.ASM7, classVisitor, remapper); } /** @@ -67,7 +67,7 @@ public class ClassRemapper extends ClassVisitor { * * @param api the ASM API version supported by this remapper. Must be one of {@link * org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link - * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}. + * org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}. * @param classVisitor the class visitor this remapper must deleted to. * @param remapper the remapper to use to remap the types in the visited class. */ @@ -181,13 +181,13 @@ public class ClassRemapper extends ClassVisitor { } @Override - public void visitNestHostExperimental(final String nestHost) { - super.visitNestHostExperimental(remapper.mapType(nestHost)); + public void visitNestHost(final String nestHost) { + super.visitNestHost(remapper.mapType(nestHost)); } @Override - public void visitNestMemberExperimental(final String nestMember) { - super.visitNestMemberExperimental(remapper.mapType(nestMember)); + public void visitNestMember(final String nestMember) { + super.visitNestMember(remapper.mapType(nestMember)); } /** diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/CodeSizeEvaluator.java b/asm-commons/src/main/java/org/objectweb/asm/commons/CodeSizeEvaluator.java index 00be4a1ac2043ed92ee9a533c8e8bf8441b11c98..796269708d2c3a4988ec5ba22569d1f840c6ba60 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/CodeSizeEvaluator.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/CodeSizeEvaluator.java @@ -47,7 +47,7 @@ public class CodeSizeEvaluator extends MethodVisitor implements Opcodes { private int maxSize; public CodeSizeEvaluator(final MethodVisitor methodVisitor) { - this(Opcodes.ASM6, methodVisitor); + this(Opcodes.ASM7, methodVisitor); } protected CodeSizeEvaluator(final int api, final MethodVisitor methodVisitor) { diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/FieldRemapper.java b/asm-commons/src/main/java/org/objectweb/asm/commons/FieldRemapper.java index 1ed80186d5246e4fe99a58394e1ff44f53bd1ee1..fd1936b62ce549ea3aca23bedde5f110d1d26670 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/FieldRemapper.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/FieldRemapper.java @@ -51,7 +51,7 @@ public class FieldRemapper extends FieldVisitor { * @param remapper the remapper to use to remap the types in the visited field. */ public FieldRemapper(final FieldVisitor fieldVisitor, final Remapper remapper) { - this(Opcodes.ASM6, fieldVisitor, remapper); + this(Opcodes.ASM7, fieldVisitor, remapper); } /** diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java b/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java index ad0df6c9e025b62fc75c5db05cacb95af4f02d03..a0f7f389bc10572a24d63e6d138050bd0ffa7cde 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java @@ -201,7 +201,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { final int access, final String name, final String descriptor) { - this(Opcodes.ASM6, methodVisitor, access, name, descriptor); + this(Opcodes.ASM7, methodVisitor, access, name, descriptor); if (getClass() != GeneratorAdapter.class) { throw new IllegalStateException(); } @@ -211,8 +211,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { * Constructs a new {@link GeneratorAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param methodVisitor the method visitor to which this adapter delegates calls. * @param access the method's access flags (see {@link Opcodes}). * @param name the method's name. diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/InstructionAdapter.java b/asm-commons/src/main/java/org/objectweb/asm/commons/InstructionAdapter.java index d99cb6a35ec358e5940861618036d3c25adb2997..f0ee5b8c4465d4a4d238abbd5403b5ae550c670e 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/InstructionAdapter.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/InstructionAdapter.java @@ -53,7 +53,7 @@ public class InstructionAdapter extends MethodVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public InstructionAdapter(final MethodVisitor methodVisitor) { - this(Opcodes.ASM6, methodVisitor); + this(Opcodes.ASM7, methodVisitor); if (getClass() != InstructionAdapter.class) { throw new IllegalStateException(); } @@ -63,8 +63,7 @@ public class InstructionAdapter extends MethodVisitor { * Constructs a new {@link InstructionAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param methodVisitor the method visitor to which this adapter delegates calls. */ protected InstructionAdapter(final int api, final MethodVisitor methodVisitor) { @@ -640,7 +639,7 @@ public class InstructionAdapter extends MethodVisitor { || (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) { throw new UnsupportedOperationException(); } - if (api != Opcodes.ASM7_EXPERIMENTAL && value instanceof ConstantDynamic) { + if (api != Opcodes.ASM7 && value instanceof ConstantDynamic) { throw new UnsupportedOperationException(); } if (value instanceof Integer) { diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/JSRInlinerAdapter.java b/asm-commons/src/main/java/org/objectweb/asm/commons/JSRInlinerAdapter.java index e0177cb45d7627ba9df012b0823b95a4a61a1680..61e114281fda6b384366f39e031d9f37d25bac15 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/JSRInlinerAdapter.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/JSRInlinerAdapter.java @@ -97,7 +97,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes { final String descriptor, final String signature, final String[] exceptions) { - this(Opcodes.ASM6, methodVisitor, access, name, descriptor, signature, exceptions); + this(Opcodes.ASM7, methodVisitor, access, name, descriptor, signature, exceptions); if (getClass() != JSRInlinerAdapter.class) { throw new IllegalStateException(); } @@ -107,8 +107,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes { * Constructs a new {@link JSRInlinerAdapter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param methodVisitor the method visitor to send the resulting inlined method code to, or * null. * @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/LocalVariablesSorter.java b/asm-commons/src/main/java/org/objectweb/asm/commons/LocalVariablesSorter.java index 293ced485433bcb2e85341908a31b01dd07abb76..b7494e667c12d1d2d7f3fe5ebb21961e0d8d769f 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/LocalVariablesSorter.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/LocalVariablesSorter.java @@ -81,7 +81,7 @@ public class LocalVariablesSorter extends MethodVisitor { */ public LocalVariablesSorter( final int access, final String descriptor, final MethodVisitor methodVisitor) { - this(Opcodes.ASM6, access, descriptor, methodVisitor); + this(Opcodes.ASM7, access, descriptor, methodVisitor); if (getClass() != LocalVariablesSorter.class) { throw new IllegalStateException(); } @@ -91,8 +91,7 @@ public class LocalVariablesSorter extends MethodVisitor { * Constructs a new {@link LocalVariablesSorter}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param access access flags of the adapted method. * @param descriptor the method's descriptor (see {@link Type}). * @param methodVisitor the method visitor to which this adapter delegates calls. diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java b/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java index ce0edcff8d25ffdf68958820538277742944546c..35c2b92b7e9ffcdae8621250fe7a7ee81508d9e0 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java @@ -53,7 +53,7 @@ public class MethodRemapper extends MethodVisitor { * @param remapper the remapper to use to remap the types in the visited method. */ public MethodRemapper(final MethodVisitor methodVisitor, final Remapper remapper) { - this(Opcodes.ASM6, methodVisitor, remapper); + this(Opcodes.ASM7, methodVisitor, remapper); } /** diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/ModuleRemapper.java b/asm-commons/src/main/java/org/objectweb/asm/commons/ModuleRemapper.java index 1511ca344baf09eabea48dcae790d4e1d18f7121..7792bbdbeb02f075a191a4876c0ec2e9c14e4bc3 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/ModuleRemapper.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/ModuleRemapper.java @@ -49,7 +49,7 @@ public class ModuleRemapper extends ModuleVisitor { * @param remapper the remapper to use to remap the types in the visited module. */ public ModuleRemapper(final ModuleVisitor moduleVisitor, final Remapper remapper) { - this(Opcodes.ASM6, moduleVisitor, remapper); + this(Opcodes.ASM7, moduleVisitor, remapper); } /** diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/SerialVersionUIDAdder.java b/asm-commons/src/main/java/org/objectweb/asm/commons/SerialVersionUIDAdder.java index 0fe4d4c51da0a6f4b7edb1f91563510556094f2a..402d9cfb9dc706619665df0bd6e4bcf550264e74 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/SerialVersionUIDAdder.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/SerialVersionUIDAdder.java @@ -149,7 +149,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public SerialVersionUIDAdder(final ClassVisitor classVisitor) { - this(Opcodes.ASM6, classVisitor); + this(Opcodes.ASM7, classVisitor); if (getClass() != SerialVersionUIDAdder.class) { throw new IllegalStateException(); } @@ -159,8 +159,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { * Constructs a new {@link SerialVersionUIDAdder}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param classVisitor a {@link ClassVisitor} to which this visitor will delegate calls. */ protected SerialVersionUIDAdder(final int api, final ClassVisitor classVisitor) { diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/SignatureRemapper.java b/asm-commons/src/main/java/org/objectweb/asm/commons/SignatureRemapper.java index 74a5599ca2ada623bea310b489c5201f6d8d0cf0..2b472e24e5635a9f38cb2cfd24dbcfabd6045e1e 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/SignatureRemapper.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/SignatureRemapper.java @@ -53,7 +53,7 @@ public class SignatureRemapper extends SignatureVisitor { * @param remapper the remapper to use to remap the types in the visited signature. */ public SignatureRemapper(final SignatureVisitor signatureVisitor, final Remapper remapper) { - this(Opcodes.ASM6, signatureVisitor, remapper); + this(Opcodes.ASM7, signatureVisitor, remapper); } /** diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/StaticInitMerger.java b/asm-commons/src/main/java/org/objectweb/asm/commons/StaticInitMerger.java index b469a93e0ea903737aac2b809cfa10d8a1b5724b..db1da0497a87a3efabf2d10203d29e70da7b2442 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/StaticInitMerger.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/StaticInitMerger.java @@ -61,7 +61,7 @@ public class StaticInitMerger extends ClassVisitor { * null. */ public StaticInitMerger(final String prefix, final ClassVisitor classVisitor) { - this(Opcodes.ASM6, prefix, classVisitor); + this(Opcodes.ASM7, prefix, classVisitor); } /** diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/TryCatchBlockSorter.java b/asm-commons/src/main/java/org/objectweb/asm/commons/TryCatchBlockSorter.java index df1a274d0107ffe1345e33b2260074e23d941153..7388bba4bab62d194e539f0e8a2765d7df3b919e 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/TryCatchBlockSorter.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/TryCatchBlockSorter.java @@ -56,7 +56,7 @@ public class TryCatchBlockSorter extends MethodNode { final String descriptor, final String signature, final String[] exceptions) { - this(Opcodes.ASM6, methodVisitor, access, name, descriptor, signature, exceptions); + this(Opcodes.ASM7, methodVisitor, access, name, descriptor, signature, exceptions); if (getClass() != TryCatchBlockSorter.class) { throw new IllegalStateException(); } diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/AdviceAdapterTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/AdviceAdapterTest.java index 0aa1202abf0dec5f035fe292110dbeb309041919..b7989ed3ea3a17536cddaa1b65512c4021f2d4ed 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/AdviceAdapterTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/AdviceAdapterTest.java @@ -395,7 +395,7 @@ public class AdviceAdapterTest extends AsmTest { methodGenerator = new MethodGenerator( new AdviceAdapter( - Opcodes.ASM6, methodVisitor, Opcodes.ACC_PUBLIC, "", descriptor) { + Opcodes.ASM7, methodVisitor, Opcodes.ACC_PUBLIC, "", descriptor) { @Override protected void onMethodEnter() { @@ -423,7 +423,7 @@ public class AdviceAdapterTest extends AsmTest { private final boolean expectedClass; MethodGenerator(final MethodVisitor methodVisitor, final boolean expectedClass) { - super(Opcodes.ASM6, methodVisitor); + super(Opcodes.ASM7, methodVisitor); this.expectedClass = expectedClass; } diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/AnalyzerAdapterTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/AnalyzerAdapterTest.java index c7b3f1c0ad74eab858f4e3294c94815487f0c044..fd8a5fbd16d8aaeff34bae8b8391569403719fef 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/AnalyzerAdapterTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/AnalyzerAdapterTest.java @@ -150,7 +150,7 @@ public class AnalyzerAdapterTest extends AsmTest { private boolean hasOriginalFrame; AnalyzedFramesInserter(final MethodVisitor methodVisitor) { - super(Opcodes.ASM7_EXPERIMENTAL, methodVisitor); + super(Opcodes.ASM7, methodVisitor); } void setAnalyzerAdapter(final AnalyzerAdapter analyzerAdapter) { diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/GeneratorAdapterTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/GeneratorAdapterTest.java index 654c75e984b1628c0d79e0b0698aea4efd7bdd2d..028f20a2fa23643a63c2f6266fb1472ad13d506d 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/GeneratorAdapterTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/GeneratorAdapterTest.java @@ -811,11 +811,7 @@ public class GeneratorAdapterTest { textifier = new Textifier(); generatorAdapter = new GeneratorAdapter( - Opcodes.ASM7_EXPERIMENTAL, - new TraceMethodVisitor(textifier), - access, - name, - descriptor); + Opcodes.ASM7, new TraceMethodVisitor(textifier), access, name, descriptor); } public String push(final boolean value) { diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/LocalVariablesSorterTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/LocalVariablesSorterTest.java index 9f4f99b0b8eb88269169afe78d8b9cf4a2a4694b..7916d1a0d39ce00a563d8eaac0ff9c31a5396641 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/LocalVariablesSorterTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/LocalVariablesSorterTest.java @@ -140,7 +140,7 @@ public class LocalVariablesSorterTest extends AsmTest { new ClassReader(new FileInputStream("src/test/resources/Issue317586.class")); ClassWriter classWriter = new ClassWriter(0); ClassVisitor classVisitor = - new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL, classWriter) { + new ClassVisitor(Opcodes.ASM7, classWriter) { @Override public MethodVisitor visitMethod( final int access, diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleHashesAttributeTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleHashesAttributeTest.java index 8fd08b540a31efb584e655370bd6c5300c7e4c1e..e2a66f09708dc6dd8bb25c79e5bef177585525d9 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleHashesAttributeTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleHashesAttributeTest.java @@ -60,7 +60,7 @@ public class ModuleHashesAttributeTest { ModuleHashesAttribute moduleHashesAttribute = new ModuleHashesAttribute(); new ClassReader(classWriter.toByteArray()) .accept( - new ClassVisitor(Opcodes.ASM6) { + new ClassVisitor(Opcodes.ASM7) { @Override public void visitAttribute(final Attribute attribute) { diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleResolutionAttributeTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleResolutionAttributeTest.java index 015667395cdb08301f9fef3dae3725aacc7d290e..2887158036812579145393dfc2f24c105458dca1 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleResolutionAttributeTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleResolutionAttributeTest.java @@ -51,7 +51,7 @@ public class ModuleResolutionAttributeTest { ModuleResolutionAttribute moduleResolutionAttribute = new ModuleResolutionAttribute(); new ClassReader(classWriter.toByteArray()) .accept( - new ClassVisitor(Opcodes.ASM6) { + new ClassVisitor(Opcodes.ASM7) { @Override public void visitAttribute(final Attribute attribute) { diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleTargetAttributeTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleTargetAttributeTest.java index 06423a56ce411ff78845232475baa3d45fc6e40b..4ca7de87f48e9a3f414ca8c1482c618565395077 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleTargetAttributeTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/ModuleTargetAttributeTest.java @@ -51,7 +51,7 @@ public class ModuleTargetAttributeTest { ModuleTargetAttribute moduleTargetAttribute = new ModuleTargetAttribute(); new ClassReader(classWriter.toByteArray()) .accept( - new ClassVisitor(Opcodes.ASM6) { + new ClassVisitor(Opcodes.ASM7) { @Override public void visitAttribute(final Attribute attribute) { diff --git a/asm-commons/src/test/java/org/objectweb/asm/commons/SerialVersionUIDAdderTest.java b/asm-commons/src/test/java/org/objectweb/asm/commons/SerialVersionUIDAdderTest.java index 9d6b01cf3ad5e17a580f6921a22fc3c8fa8385b6..17d6206c3a0c60e75bb21fb1b364fd461a66bf4c 100644 --- a/asm-commons/src/test/java/org/objectweb/asm/commons/SerialVersionUIDAdderTest.java +++ b/asm-commons/src/test/java/org/objectweb/asm/commons/SerialVersionUIDAdderTest.java @@ -51,7 +51,7 @@ public class SerialVersionUIDAdderTest extends AsmTest { long[] svuid = new long[1]; new ClassReader(className) .accept( - new SerialVersionUIDAdder(Opcodes.ASM6, null) { + new SerialVersionUIDAdder(Opcodes.ASM7, null) { @Override protected long computeSVUID() throws IOException { svuid[0] = super.computeSVUID(); @@ -109,7 +109,7 @@ public class SerialVersionUIDAdderTest extends AsmTest { final PrecompiledClass classParameter, final Api apiParameter) { ClassReader classReader = new ClassReader(classParameter.getBytes()); ClassWriter classWriter = new ClassWriter(0); - classReader.accept(new SerialVersionUIDAdder(Opcodes.ASM7_EXPERIMENTAL, classWriter) {}, 0); + classReader.accept(new SerialVersionUIDAdder(classWriter), 0); if ((classReader.getAccess() & Opcodes.ACC_ENUM) == 0) { assertThatClass(classWriter.toByteArray()).contains("serialVersionUID"); } diff --git a/asm-test/src/main/java/org/objectweb/asm/test/AsmTest.java b/asm-test/src/main/java/org/objectweb/asm/test/AsmTest.java index 8514a8dde10c864d801000ff742faa111ea28bfc..8f83a18e9d76161e2a982ea7fc0baefa3d94f7d8 100644 --- a/asm-test/src/main/java/org/objectweb/asm/test/AsmTest.java +++ b/asm-test/src/main/java/org/objectweb/asm/test/AsmTest.java @@ -235,7 +235,7 @@ public abstract class AsmTest { ASM4("ASM4", 4 << 16), ASM5("ASM5", 5 << 16), ASM6("ASM6", 6 << 16), - ASM7("ASM7", 1 << 24 | 7 << 16); + ASM7("ASM7", 7 << 16); private final String name; private final int value; diff --git a/asm-test/src/test/java/org/objectweb/asm/test/AsmTestTest.java b/asm-test/src/test/java/org/objectweb/asm/test/AsmTestTest.java index 35ecb3c30f336a8c9f9218606f98774054d82c4a..d92606d7be356c59e5c5fd79c539262703dfc50d 100644 --- a/asm-test/src/test/java/org/objectweb/asm/test/AsmTestTest.java +++ b/asm-test/src/test/java/org/objectweb/asm/test/AsmTestTest.java @@ -73,7 +73,7 @@ public class AsmTestTest extends AsmTest { @MethodSource(ALL_CLASSES_AND_LATEST_API) public void testGetBytes(final PrecompiledClass classParameter, final Api apiParameter) { assertEquals(Api.ASM7, apiParameter); - assertEquals(0x01070000, apiParameter.value()); + assertEquals(0x70000, apiParameter.value()); assertEquals("ASM7", apiParameter.toString()); byte[] classContent = classParameter.getBytes(); assertThatClass(classContent).contains(classParameter.getInternalName()); diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/AnnotationNode.java b/asm-tree/src/main/java/org/objectweb/asm/tree/AnnotationNode.java index 6b0e297390adf0af59ee2eec5708d288d0e88e41..485df785f8fa0acf3d603eb737e9d1def203bdef 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/AnnotationNode.java +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/AnnotationNode.java @@ -60,7 +60,7 @@ public class AnnotationNode extends AnnotationVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public AnnotationNode(final String descriptor) { - this(Opcodes.ASM6, descriptor); + this(Opcodes.ASM7, descriptor); if (getClass() != AnnotationNode.class) { throw new IllegalStateException(); } @@ -70,8 +70,7 @@ public class AnnotationNode extends AnnotationVisitor { * Constructs a new {@link AnnotationNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param descriptor the class descriptor of the annotation class. */ public AnnotationNode(final int api, final String descriptor) { @@ -85,7 +84,7 @@ public class AnnotationNode extends AnnotationVisitor { * @param values where the visited values must be stored. */ AnnotationNode(final List values) { - super(Opcodes.ASM6); + super(Opcodes.ASM7); this.values = values; } @@ -174,7 +173,7 @@ public class AnnotationNode extends AnnotationVisitor { * introduced in more recent versions of the ASM API than the given version. * * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, - * {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public void check(final int api) { // nothing to do diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/ClassNode.java b/asm-tree/src/main/java/org/objectweb/asm/tree/ClassNode.java index 766feabb9c2e1503ce08d1765cb1a3c7890be830..f54225615f228eba160df5e8696913d5085058e7 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/ClassNode.java +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/ClassNode.java @@ -120,19 +120,11 @@ public class ClassNode extends ClassVisitor { /** The inner classes of this class. */ public List innerClasses; - /** - * Experimental, use at your own risk. This field will be renamed when it becomes stable, this - * will break existing code using it. The internal name of the nest host class of this class. - * May be {@literal null}. - */ - public String nestHostClassExperimental; + /** The internal name of the nest host class of this class. May be {@literal null}. */ + public String nestHostClass; - /** - * Experimental, use at your own risk. This field will be renamed when it becomes stable, this - * will break existing code using it. The internal names of the nest members of this class. - * May be {@literal null}. - */ - public List nestMembersExperimental; + /** The internal names of the nest members of this class. May be {@literal null}. */ + public List nestMembers; /** The fields of this class. */ public List fields; @@ -147,7 +139,7 @@ public class ClassNode extends ClassVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public ClassNode() { - this(Opcodes.ASM6); + this(Opcodes.ASM7); if (getClass() != ClassNode.class) { throw new IllegalStateException(); } @@ -157,8 +149,7 @@ public class ClassNode extends ClassVisitor { * Constructs a new {@link ClassNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public ClassNode(final int api) { super(api); @@ -201,8 +192,8 @@ public class ClassNode extends ClassVisitor { } @Override - public void visitNestHostExperimental(final String nestHost) { - this.nestHostClassExperimental = nestHost; + public void visitNestHost(final String nestHost) { + this.nestHostClass = nestHost; } @Override @@ -256,11 +247,11 @@ public class ClassNode extends ClassVisitor { } @Override - public void visitNestMemberExperimental(final String nestMember) { - if (nestMembersExperimental == null) { - nestMembersExperimental = new ArrayList(); + public void visitNestMember(final String nestMember) { + if (nestMembers == null) { + nestMembers = new ArrayList(); } - nestMembersExperimental.add(nestMember); + nestMembers.add(nestMember); } @Override @@ -309,11 +300,10 @@ public class ClassNode extends ClassVisitor { * in more recent versions of the ASM API than the given version. * * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, - * {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public void check(final int api) { - if (api < Opcodes.ASM7_EXPERIMENTAL - && (nestHostClassExperimental != null || nestMembersExperimental != null)) { + if (api < Opcodes.ASM7 && (nestHostClass != null || nestMembers != null)) { throw new UnsupportedClassVersionException(); } if (api < Opcodes.ASM6 && module != null) { @@ -375,8 +365,8 @@ public class ClassNode extends ClassVisitor { module.accept(classVisitor); } // Visit the nest host class. - if (nestHostClassExperimental != null) { - classVisitor.visitNestHostExperimental(nestHostClassExperimental); + if (nestHostClass != null) { + classVisitor.visitNestHost(nestHostClass); } // Visit the outer class. if (outerClass != null) { @@ -418,9 +408,9 @@ public class ClassNode extends ClassVisitor { } } // Visit the nest members. - if (nestMembersExperimental != null) { - for (int i = 0, n = nestMembersExperimental.size(); i < n; ++i) { - classVisitor.visitNestMemberExperimental(nestMembersExperimental.get(i)); + if (nestMembers != null) { + for (int i = 0, n = nestMembers.size(); i < n; ++i) { + classVisitor.visitNestMember(nestMembers.get(i)); } } // Visit the inner classes. diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/FieldNode.java b/asm-tree/src/main/java/org/objectweb/asm/tree/FieldNode.java index 978ea6d6d21e0d054355ad3e5364bf9ee2f03f78..a0b9a4d1c588716f87db120fac6954d00116963f 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/FieldNode.java +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/FieldNode.java @@ -100,7 +100,7 @@ public class FieldNode extends FieldVisitor { final String descriptor, final String signature, final Object value) { - this(Opcodes.ASM6, access, name, descriptor, signature, value); + this(Opcodes.ASM7, access, name, descriptor, signature, value); if (getClass() != FieldNode.class) { throw new IllegalStateException(); } @@ -197,7 +197,7 @@ public class FieldNode extends FieldVisitor { * in more recent versions of the ASM API than the given version. * * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, - * {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public void check(final int api) { if (api == Opcodes.ASM4) { diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/LocalVariableAnnotationNode.java b/asm-tree/src/main/java/org/objectweb/asm/tree/LocalVariableAnnotationNode.java index 42b9826b4b6dff71e772e5344d8dbeb0c584ca8d..e22033c145ed469983e67699aa059f58d73c3741 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/LocalVariableAnnotationNode.java +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/LocalVariableAnnotationNode.java @@ -84,15 +84,14 @@ public class LocalVariableAnnotationNode extends TypeAnnotationNode { final LabelNode[] end, final int[] index, final String descriptor) { - this(Opcodes.ASM6, typeRef, typePath, start, end, index, descriptor); + this(Opcodes.ASM7, typeRef, typePath, start, end, index, descriptor); } /** * Constructs a new {@link LocalVariableAnnotationNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param typeRef a reference to the annotated type. See {@link org.objectweb.asm.TypeReference}. * @param start the fist instructions corresponding to the continuous ranges that make the scope * of this local variable (inclusive). diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/MethodNode.java b/asm-tree/src/main/java/org/objectweb/asm/tree/MethodNode.java index a3f080b889224ee02e4e915fc202b8acf634c446..1e45816bf78dbe7e019d32a258060e89cc0c52df 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/MethodNode.java +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/MethodNode.java @@ -155,7 +155,7 @@ public class MethodNode extends MethodVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public MethodNode() { - this(Opcodes.ASM6); + this(Opcodes.ASM7); if (getClass() != MethodNode.class) { throw new IllegalStateException(); } @@ -165,8 +165,7 @@ public class MethodNode extends MethodVisitor { * Constructs an uninitialized {@link MethodNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public MethodNode(final int api) { super(api); @@ -192,7 +191,7 @@ public class MethodNode extends MethodVisitor { final String descriptor, final String signature, final String[] exceptions) { - this(Opcodes.ASM6, access, name, descriptor, signature, exceptions); + this(Opcodes.ASM7, access, name, descriptor, signature, exceptions); if (getClass() != MethodNode.class) { throw new IllegalStateException(); } @@ -202,8 +201,7 @@ public class MethodNode extends MethodVisitor { * Constructs a new {@link MethodNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if * the method is synthetic and/or deprecated. * @param name the method's name. @@ -606,7 +604,7 @@ public class MethodNode extends MethodVisitor { * in more recent versions of the ASM API than the given version. * * @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, - * {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public void check(final int api) { if (api == Opcodes.ASM4) { @@ -661,7 +659,7 @@ public class MethodNode extends MethodVisitor { throw new UnsupportedClassVersionException(); } } - if (api != Opcodes.ASM7_EXPERIMENTAL) { + if (api != Opcodes.ASM7) { for (int i = instructions.size() - 1; i >= 0; --i) { AbstractInsnNode insn = instructions.get(i); if (insn instanceof LdcInsnNode) { diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/ModuleNode.java b/asm-tree/src/main/java/org/objectweb/asm/tree/ModuleNode.java index 600c9f3c283577e9727af89a28afd290a844a5d1..16b0fd77a03a59c205d400ae772b1d80d1be89d7 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/ModuleNode.java +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/ModuleNode.java @@ -84,7 +84,7 @@ public class ModuleNode extends ModuleVisitor { * @throws IllegalStateException If a subclass calls this constructor. */ public ModuleNode(final String name, final int access, final String version) { - super(Opcodes.ASM6); + super(Opcodes.ASM7); if (getClass() != ModuleNode.class) { throw new IllegalStateException(); } @@ -98,7 +98,7 @@ public class ModuleNode extends ModuleVisitor { * Constructs a {@link ModuleNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM6} - * or {@link Opcodes#ASM7_EXPERIMENTAL}. + * or {@link Opcodes#ASM7}. * @param name the fully qualified name (using dots) of the module. * @param access the module access flags, among {@code ACC_OPEN}, {@code ACC_SYNTHETIC} and {@code * ACC_MANDATED}. diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/TypeAnnotationNode.java b/asm-tree/src/main/java/org/objectweb/asm/tree/TypeAnnotationNode.java index c7d23d03f88a3b5461f3a50584aa16904151307a..8634828ba63d7212e97ffd3db798bff550c9a8be 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/TypeAnnotationNode.java +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/TypeAnnotationNode.java @@ -59,7 +59,7 @@ public class TypeAnnotationNode extends AnnotationNode { * @throws IllegalStateException If a subclass calls this constructor. */ public TypeAnnotationNode(final int typeRef, final TypePath typePath, final String descriptor) { - this(Opcodes.ASM6, typeRef, typePath, descriptor); + this(Opcodes.ASM7, typeRef, typePath, descriptor); if (getClass() != TypeAnnotationNode.class) { throw new IllegalStateException(); } @@ -69,8 +69,7 @@ public class TypeAnnotationNode extends AnnotationNode { * Constructs a new {@link AnnotationNode}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param typeRef a reference to the annotated type. See {@link org.objectweb.asm.TypeReference}. * @param typePath the path to the annotated type argument, wildcard bound, array element type, or * static inner type within 'typeRef'. May be {@literal null} if the annotation targets diff --git a/asm-tree/src/main/java/org/objectweb/asm/tree/package.html b/asm-tree/src/main/java/org/objectweb/asm/tree/package.html index 9756a76cf7644e0db84e8f79b65ab083b3193b1e..ab295acd9a7c24c690b18162d481ae0aa7f79ed4 100644 --- a/asm-tree/src/main/java/org/objectweb/asm/tree/package.html +++ b/asm-tree/src/main/java/org/objectweb/asm/tree/package.html @@ -77,7 +77,7 @@ In this example MethodNode is acting as a buffer that is flushed out at visitEnd
   ClassReader classReader = new ClassReader(source);
   ClassWriter classWriter = new ClassWriter(0);
-  ClassVisitor classVisitor = new ClassVisitor(ASM6, classWriter) {
+  ClassVisitor classVisitor = new ClassVisitor(ASM7, classWriter) {
     public MethodVisitor visitMethod(int access, String name,
         String desc, String signature, String[] exceptions) {
       final MethodVisitor methodVisitor = 
diff --git a/asm-tree/src/test/java/org/objectweb/asm/tree/ClassNodeTest.java b/asm-tree/src/test/java/org/objectweb/asm/tree/ClassNodeTest.java
index 4bf967220ed5850eef213f0e6058903525d8f02c..c216f95acfd19fc5e0b885a388c60c81d37fa702 100644
--- a/asm-tree/src/test/java/org/objectweb/asm/tree/ClassNodeTest.java
+++ b/asm-tree/src/test/java/org/objectweb/asm/tree/ClassNodeTest.java
@@ -80,10 +80,9 @@ public class ClassNodeTest extends AsmTest implements Opcodes {
     assertEquals("1.0", moduleNode.version);
 
     ModuleNode otherModuleNode =
-        new ModuleNode(
-            Opcodes.ASM7_EXPERIMENTAL, "otherModule", 456, "2.0", null, null, null, null, null);
+        new ModuleNode(Opcodes.ASM7, "otherModule", 456, "2.0", null, null, null, null, null);
     moduleNode.accept(
-        new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL) {
+        new ClassVisitor(Opcodes.ASM7) {
           @Override
           public ModuleVisitor visitModule(
               final String name, final int access, final String version) {
@@ -150,7 +149,7 @@ public class ClassNodeTest extends AsmTest implements Opcodes {
     assertEquals("value", annotationNode.values.get(17));
 
     annotationNode.accept(
-        new AnnotationVisitor(Opcodes.ASM7_EXPERIMENTAL) {
+        new AnnotationVisitor(Opcodes.ASM7) {
 
           @Override
           public AnnotationVisitor visitAnnotation(final String name, final String descriptor) {
@@ -501,10 +500,10 @@ public class ClassNodeTest extends AsmTest implements Opcodes {
     }
 
     @Override
-    public void visitNestHostExperimental(final String nestHost) {}
+    public void visitNestHost(final String nestHost) {}
 
     @Override
-    public void visitNestMemberExperimental(final String nestMember) {}
+    public void visitNestMember(final String nestMember) {}
 
     @Override
     public void visitAttribute(final Attribute attribute) {}
diff --git a/asm-tree/src/test/java/org/objectweb/asm/tree/InsnListTest.java b/asm-tree/src/test/java/org/objectweb/asm/tree/InsnListTest.java
index e1e06b72d437aa6b9d81dfa271e3a91a735d1490..6e0df8f5f0d1c190fc929dbe6baf4733365b35e8 100644
--- a/asm-tree/src/test/java/org/objectweb/asm/tree/InsnListTest.java
+++ b/asm-tree/src/test/java/org/objectweb/asm/tree/InsnListTest.java
@@ -741,7 +741,7 @@ public class InsnListTest {
 
     final InsnList insnList = new InsnList();
     list1.accept(
-        new MethodVisitor(Opcodes.ASM7_EXPERIMENTAL) {
+        new MethodVisitor(Opcodes.ASM7) {
           @Override
           public void visitInsn(final int opcode) {
             insnList.add(new InsnNode(opcode));
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java b/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java
index 6cc004216bb6b96cc7ea4a5e1a3cade1f88bfa4c..349fa558d2d01c45507c13e52442902fc19a51f5 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/ASMifier.java
@@ -100,7 +100,7 @@ public class ASMifier extends Printer {
    * @throws IllegalStateException If a subclass calls this constructor.
    */
   public ASMifier() {
-    this(Opcodes.ASM6, "classWriter", 0);
+    this(Opcodes.ASM7, "classWriter", 0);
     if (getClass() != ASMifier.class) {
       throw new IllegalStateException();
     }
@@ -110,7 +110,7 @@ public class ASMifier extends Printer {
    * Constructs a new {@link ASMifier}.
    *
    * @param api the ASM API version implemented by this class. Must be one of {@link Opcodes#ASM4},
-   *     {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
+   *     {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param visitorVariableName the name of the visitor variable in the produced code.
    * @param annotationVisitorId identifier of the annotation visitor variable in the produced code.
    */
@@ -239,9 +239,9 @@ public class ASMifier extends Printer {
   }
 
   @Override
-  public void visitNestHostExperimental(final String nestHost) {
+  public void visitNestHost(final String nestHost) {
     stringBuilder.setLength(0);
-    stringBuilder.append("classWriter.visitNestHostExperimental(");
+    stringBuilder.append("classWriter.visitNestHost(");
     appendConstant(nestHost);
     stringBuilder.append(");\n\n");
     text.add(stringBuilder.toString());
@@ -277,9 +277,9 @@ public class ASMifier extends Printer {
   }
 
   @Override
-  public void visitNestMemberExperimental(final String nestMember) {
+  public void visitNestMember(final String nestMember) {
     stringBuilder.setLength(0);
-    stringBuilder.append("classWriter.visitNestMemberExperimental(");
+    stringBuilder.append("classWriter.visitNestMember(");
     appendConstant(nestMember);
     stringBuilder.append(");\n\n");
     text.add(stringBuilder.toString());
@@ -1194,7 +1194,7 @@ public class ASMifier extends Printer {
    */
   protected ASMifier createASMifier(
       final String visitorVariableName, final int annotationVisitorId) {
-    return new ASMifier(Opcodes.ASM6, visitorVariableName, annotationVisitorId);
+    return new ASMifier(Opcodes.ASM7, visitorVariableName, annotationVisitorId);
   }
 
   /**
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/CheckAnnotationAdapter.java b/asm-util/src/main/java/org/objectweb/asm/util/CheckAnnotationAdapter.java
index 9b5f6b0a7201a2384623298eb3917de52e93e4fc..6a868f367f3b50559f5d339ed900424340f4f7a1 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/CheckAnnotationAdapter.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/CheckAnnotationAdapter.java
@@ -52,7 +52,7 @@ public class CheckAnnotationAdapter extends AnnotationVisitor {
   }
 
   CheckAnnotationAdapter(final AnnotationVisitor annotationVisitor, final boolean useNamedValues) {
-    super(Opcodes.ASM6, annotationVisitor);
+    super(Opcodes.ASM7, annotationVisitor);
     this.useNamedValue = useNamedValues;
   }
 
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/CheckClassAdapter.java b/asm-util/src/main/java/org/objectweb/asm/util/CheckClassAdapter.java
index ae985fcece4bf634c1e6a0f2c54bc80e5432a1b5..575a600c085f5d5af73318f86ab5306d286e8be5 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/CheckClassAdapter.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/CheckClassAdapter.java
@@ -127,7 +127,7 @@ public class CheckClassAdapter extends ClassVisitor {
   /** Whether the {@link #visitOuterClass} method has been called. */
   private boolean visitOuterClassCalled;
 
-  /** Whether the {@link #visitNestHostExperimental} method has been called. */
+  /** Whether the {@link #visitNestHost} method has been called. */
   private boolean visitNestHostCalled;
 
   /**
@@ -200,8 +200,7 @@ public class CheckClassAdapter extends ClassVisitor {
       final PrintWriter printWriter) {
     ClassNode classNode = new ClassNode();
     classReader.accept(
-        new CheckClassAdapter(Opcodes.ASM7_EXPERIMENTAL, classNode, false) {},
-        ClassReader.SKIP_DEBUG);
+        new CheckClassAdapter(Opcodes.ASM7, classNode, false) {}, ClassReader.SKIP_DEBUG);
 
     Type syperType = classNode.superName == null ? null : Type.getObjectType(classNode.superName);
     List methods = classNode.methods;
@@ -307,7 +306,7 @@ public class CheckClassAdapter extends ClassVisitor {
    * @throws IllegalStateException If a subclass calls this constructor.
    */
   public CheckClassAdapter(final ClassVisitor classVisitor, final boolean checkDataFlow) {
-    this(Opcodes.ASM6, classVisitor, checkDataFlow);
+    this(Opcodes.ASM7, classVisitor, checkDataFlow);
     if (getClass() != CheckClassAdapter.class) {
       throw new IllegalStateException();
     }
@@ -317,8 +316,7 @@ public class CheckClassAdapter extends ClassVisitor {
    * Constructs a new {@link CheckClassAdapter}.
    *
    * @param api the ASM API version implemented by this visitor. Must be one of {@link
-   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
-   *     Opcodes#ASM7_EXPERIMENTAL}.
+   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param classVisitor the class visitor to which this adapter must delegate calls.
    * @param checkDataFlow {@literal true} to perform basic data flow checks, or {@literal false} to
    *     not perform any data flow check (see {@link CheckMethodAdapter}). This option requires
@@ -423,7 +421,7 @@ public class CheckClassAdapter extends ClassVisitor {
   }
 
   @Override
-  public void visitNestHostExperimental(final String nestHost) {
+  public void visitNestHost(final String nestHost) {
     checkState();
     CheckMethodAdapter.checkInternalName(version, nestHost, "nestHost");
     if (visitNestHostCalled) {
@@ -433,11 +431,11 @@ public class CheckClassAdapter extends ClassVisitor {
       throw new IllegalStateException("visitNestHost and visitNestMember are mutually exclusive.");
     }
     visitNestHostCalled = true;
-    super.visitNestHostExperimental(nestHost);
+    super.visitNestHost(nestHost);
   }
 
   @Override
-  public void visitNestMemberExperimental(final String nestMember) {
+  public void visitNestMember(final String nestMember) {
     checkState();
     CheckMethodAdapter.checkInternalName(version, nestMember, "nestMember");
     if (visitNestHostCalled) {
@@ -451,7 +449,7 @@ public class CheckClassAdapter extends ClassVisitor {
       throw new IllegalStateException(
           "nest member " + nestMember + " should be in the package " + nestMemberPackageName);
     }
-    super.visitNestMemberExperimental(nestMember);
+    super.visitNestMember(nestMember);
   }
 
   @Override
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/CheckFieldAdapter.java b/asm-util/src/main/java/org/objectweb/asm/util/CheckFieldAdapter.java
index ce08fa2e08dad9d959b5d8939746566a0adde17b..205d94845b30128dd3f0cef515e495e50ae4af56 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/CheckFieldAdapter.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/CheckFieldAdapter.java
@@ -52,7 +52,7 @@ public class CheckFieldAdapter extends FieldVisitor {
    * @throws IllegalStateException If a subclass calls this constructor.
    */
   public CheckFieldAdapter(final FieldVisitor fieldVisitor) {
-    this(Opcodes.ASM6, fieldVisitor);
+    this(Opcodes.ASM7, fieldVisitor);
     if (getClass() != CheckFieldAdapter.class) {
       throw new IllegalStateException();
     }
@@ -62,8 +62,7 @@ public class CheckFieldAdapter extends FieldVisitor {
    * Constructs a new {@link CheckFieldAdapter}.
    *
    * @param api the ASM API version implemented by this visitor. Must be one of {@link
-   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
-   *     Opcodes#ASM7_EXPERIMENTAL}.
+   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param fieldVisitor the field visitor to which this adapter must delegate calls.
    */
   protected CheckFieldAdapter(final int api, final FieldVisitor fieldVisitor) {
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/CheckMethodAdapter.java b/asm-util/src/main/java/org/objectweb/asm/util/CheckMethodAdapter.java
index da2e4de9ca8a30b8d24a1d09172645a19379756d..981a1dd7f9db1e7f26a204b7401174cd45427826 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/CheckMethodAdapter.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/CheckMethodAdapter.java
@@ -366,7 +366,7 @@ public class CheckMethodAdapter extends MethodVisitor {
    */
   public CheckMethodAdapter(
       final MethodVisitor methodVisitor, final Map labelInsnIndices) {
-    this(Opcodes.ASM6, methodVisitor, labelInsnIndices);
+    this(Opcodes.ASM7, methodVisitor, labelInsnIndices);
     if (getClass() != CheckMethodAdapter.class) {
       throw new IllegalStateException();
     }
@@ -377,8 +377,7 @@ public class CheckMethodAdapter extends MethodVisitor {
    * data flow check (see {@link #CheckMethodAdapter(int,String,String,MethodVisitor,Map)}).
    *
    * @param api the ASM API version implemented by this CheckMethodAdapter. Must be one of {@link
-   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
-   *     Opcodes#ASM7_EXPERIMENTAL}.
+   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param methodVisitor the method visitor to which this adapter must delegate calls.
    * @param labelInsnIndices the index of the instruction designated by each visited label so far
    *     (in other methods). This map is updated with the labels from the visited method.
@@ -413,7 +412,7 @@ public class CheckMethodAdapter extends MethodVisitor {
       final String descriptor,
       final MethodVisitor methodVisitor,
       final Map labelInsnIndices) {
-    this(Opcodes.ASM6, access, name, descriptor, methodVisitor, labelInsnIndices);
+    this(Opcodes.ASM7, access, name, descriptor, methodVisitor, labelInsnIndices);
     if (getClass() != CheckMethodAdapter.class) {
       throw new IllegalStateException();
     }
@@ -425,8 +424,7 @@ public class CheckMethodAdapter extends MethodVisitor {
    * instruction IRETURN, or the invalid sequence IADD L2I will be detected.
    *
    * @param api the ASM API version implemented by this CheckMethodAdapter. Must be one of {@link
-   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
-   *     Opcodes#ASM7_EXPERIMENTAL}.
+   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param access the method's access flags.
    * @param name the method's name.
    * @param descriptor the method's descriptor (see {@link Type}).
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/CheckModuleAdapter.java b/asm-util/src/main/java/org/objectweb/asm/util/CheckModuleAdapter.java
index a94f5f8d29a8419c8384635ebd2221c811f5eadc..a964d6f379b4268e21bec54e7e451dfd5fd2cb07 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/CheckModuleAdapter.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/CheckModuleAdapter.java
@@ -71,7 +71,7 @@ public class CheckModuleAdapter extends ModuleVisitor {
    * @throws IllegalStateException If a subclass calls this constructor.
    */
   public CheckModuleAdapter(final ModuleVisitor moduleVisitor, final boolean isOpen) {
-    this(Opcodes.ASM6, moduleVisitor, isOpen);
+    this(Opcodes.ASM7, moduleVisitor, isOpen);
     if (getClass() != CheckModuleAdapter.class) {
       throw new IllegalStateException();
     }
@@ -81,8 +81,7 @@ public class CheckModuleAdapter extends ModuleVisitor {
    * Constructs a new {@link CheckModuleAdapter}.
    *
    * @param api the ASM API version implemented by this visitor. Must be one of {@link
-   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
-   *     Opcodes#ASM7_EXPERIMENTAL}.
+   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param moduleVisitor the module visitor to which this adapter must delegate calls.
    * @param isOpen whether the visited module is open. Open modules have their {@link
    *     Opcodes#ACC_OPEN} access flag set in {@link org.objectweb.asm.ClassVisitor#visitModule}.
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/CheckSignatureAdapter.java b/asm-util/src/main/java/org/objectweb/asm/util/CheckSignatureAdapter.java
index b64f780aa274e15847c49b8937caa8b8939a0605..edf61ca0ec3901877bb2bb602851d55d7d4bc371 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/CheckSignatureAdapter.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/CheckSignatureAdapter.java
@@ -123,15 +123,14 @@ public class CheckSignatureAdapter extends SignatureVisitor {
    *     null}.
    */
   public CheckSignatureAdapter(final int type, final SignatureVisitor signatureVisitor) {
-    this(Opcodes.ASM6, type, signatureVisitor);
+    this(Opcodes.ASM7, type, signatureVisitor);
   }
 
   /**
    * Constructs a new {@link CheckSignatureAdapter}.
    *
    * @param api the ASM API version implemented by this visitor. Must be one of {@link
-   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
-   *     Opcodes#ASM7_EXPERIMENTAL}.
+   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param type the type of signature to be checked. See {@link #CLASS_SIGNATURE}, {@link
    *     #METHOD_SIGNATURE} and {@link #TYPE_SIGNATURE}.
    * @param signatureVisitor the visitor to which this adapter must delegate calls. May be {@literal
diff --git a/asm-util/src/main/java/org/objectweb/asm/util/Printer.java b/asm-util/src/main/java/org/objectweb/asm/util/Printer.java
index 1153ffe1ddda2346fe27cd5f811515be04bbd175..a633e86188f16907ba1bdd1b53047342ebba7128 100644
--- a/asm-util/src/main/java/org/objectweb/asm/util/Printer.java
+++ b/asm-util/src/main/java/org/objectweb/asm/util/Printer.java
@@ -290,7 +290,7 @@ public abstract class Printer {
 
   /**
    * The ASM API version implemented by this class. The value of this field must be one of {@link
-   * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
+   * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    */
   protected final int api;
 
@@ -324,8 +324,7 @@ public abstract class Printer {
    * Constructs a new {@link Printer}.
    *
    * @param api the ASM API version implemented by this printer. Must be one of {@link
-   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
-   *     Opcodes#ASM7_EXPERIMENTAL}.
+   *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    */
   protected Printer(final int api) {
     this.api = api;
@@ -387,11 +386,7 @@ public abstract class Printer {
   }
 
   /**
-   * Experimental, use at your own risk. This method will be renamed when it becomes stable, this
-   * will break existing code using it. Nest host class. See {@link
-   * org.objectweb.asm.ClassVisitor#visitNestHostExperimental}.
-   *
-   * 

Visits the nest host class of the class. A nest is a set of classes of the same package that + * Visits the nest host class of the class. A nest is a set of classes of the same package that * share access to their private members. One of these classes, called the host, lists the other * members of the nest, which in turn should link to the host of their nest. This method must be * called only once and only if the visited class is a non-host member of a nest. A class is @@ -399,10 +394,8 @@ public abstract class Printer { * argument. * * @param nestHost the internal name of the host class of the nest. - * @deprecated This API is experimental. */ - @Deprecated - public void visitNestHostExperimental(final String nestHost) { + public void visitNestHost(final String nestHost) { throw new UnsupportedOperationException(UNSUPPORTED_OPERATION); } @@ -454,21 +447,15 @@ public abstract class Printer { public abstract void visitClassAttribute(Attribute attribute); /** - * Experimental, use at your own risk. This method will be renamed when it becomes stable, this - * will break existing code using it. Nest member name. See {@link - * org.objectweb.asm.ClassVisitor#visitNestMemberExperimental}. - * - *

Visits a member of the nest. A nest is a set of classes of the same package that share - * access to their private members. One of these classes, called the host, lists the other members - * of the nest, which in turn should link to the host of their nest. This method must be called - * only if the visited class is the host of a nest. A nest host is implicitly a member of its own - * nest, so it's invalid to call this method with the visited class name as argument. + * Visits a member of the nest. A nest is a set of classes of the same package that share access + * to their private members. One of these classes, called the host, lists the other members of the + * nest, which in turn should link to the host of their nest. This method must be called only if + * the visited class is the host of a nest. A nest host is implicitly a member of its own nest, so + * it's invalid to call this method with the visited class name as argument. * * @param nestMember the internal name of a nest member. - * @deprecated This API is experimental. */ - @Deprecated - public void visitNestMemberExperimental(final String nestMember) { + public void visitNestMember(final String nestMember) { throw new UnsupportedOperationException(UNSUPPORTED_OPERATION); } diff --git a/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java b/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java index 0e45a5b8f2827023dcd048fdb716cf3d1c373b24..b02218b02dec655764878471707b1cd65eab4bd9 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/Textifier.java @@ -108,7 +108,7 @@ public class Textifier extends Printer { * @throws IllegalStateException If a subclass calls this constructor. */ public Textifier() { - this(Opcodes.ASM6); + this(Opcodes.ASM7); if (getClass() != Textifier.class) { throw new IllegalStateException(); } @@ -118,8 +118,7 @@ public class Textifier extends Printer { * Constructs a new {@link Textifier}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected Textifier(final int api) { super(api); @@ -237,7 +236,7 @@ public class Textifier extends Printer { } @Override - public void visitNestHostExperimental(final String nestHost) { + public void visitNestHost(final String nestHost) { stringBuilder.setLength(0); stringBuilder.append(tab).append("NESTHOST "); appendDescriptor(INTERNAL_NAME, nestHost); @@ -279,7 +278,7 @@ public class Textifier extends Printer { } @Override - public void visitNestMemberExperimental(final String nestMember) { + public void visitNestMember(final String nestMember) { stringBuilder.setLength(0); stringBuilder.append(tab).append("NESTMEMBER "); appendDescriptor(INTERNAL_NAME, nestMember); diff --git a/asm-util/src/main/java/org/objectweb/asm/util/TraceAnnotationVisitor.java b/asm-util/src/main/java/org/objectweb/asm/util/TraceAnnotationVisitor.java index d74220c1d94d9634e633c3baf2e487bdf0fa1634..1cc9621a685a0d66b99734ef064f254836ed9b40 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/TraceAnnotationVisitor.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/TraceAnnotationVisitor.java @@ -57,7 +57,7 @@ public final class TraceAnnotationVisitor extends AnnotationVisitor { * @param printer the printer to convert the visited annotation into text. */ public TraceAnnotationVisitor(final AnnotationVisitor annotationVisitor, final Printer printer) { - super(Opcodes.ASM7_EXPERIMENTAL, annotationVisitor); + super(Opcodes.ASM7, annotationVisitor); this.printer = printer; } diff --git a/asm-util/src/main/java/org/objectweb/asm/util/TraceClassVisitor.java b/asm-util/src/main/java/org/objectweb/asm/util/TraceClassVisitor.java index 74541cd699bba9ed34aab6181fd7b95625f117f8..d0f89b1debf6de2e9ed8dd200981129bdc346b99 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/TraceClassVisitor.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/TraceClassVisitor.java @@ -117,7 +117,7 @@ public final class TraceClassVisitor extends ClassVisitor { */ public TraceClassVisitor( final ClassVisitor classVisitor, final Printer printer, final PrintWriter printWriter) { - super(Opcodes.ASM7_EXPERIMENTAL, classVisitor); + super(Opcodes.ASM7, classVisitor); this.printWriter = printWriter; this.p = printer; } @@ -147,9 +147,9 @@ public final class TraceClassVisitor extends ClassVisitor { } @Override - public void visitNestHostExperimental(final String nestHost) { - p.visitNestHostExperimental(nestHost); - super.visitNestHostExperimental(nestHost); + public void visitNestHost(final String nestHost) { + p.visitNestHost(nestHost); + super.visitNestHost(nestHost); } @Override @@ -180,9 +180,9 @@ public final class TraceClassVisitor extends ClassVisitor { } @Override - public void visitNestMemberExperimental(final String nestMember) { - p.visitNestMemberExperimental(nestMember); - super.visitNestMemberExperimental(nestMember); + public void visitNestMember(final String nestMember) { + p.visitNestMember(nestMember); + super.visitNestMember(nestMember); } @Override diff --git a/asm-util/src/main/java/org/objectweb/asm/util/TraceFieldVisitor.java b/asm-util/src/main/java/org/objectweb/asm/util/TraceFieldVisitor.java index 11f532bdf6cb22d3a1fe04157b756cfb6f460239..78590ed5fe1d052fbc3059c26d6172f932083857 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/TraceFieldVisitor.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/TraceFieldVisitor.java @@ -59,7 +59,7 @@ public final class TraceFieldVisitor extends FieldVisitor { * @param printer the printer to convert the visited field into text. */ public TraceFieldVisitor(final FieldVisitor fieldVisitor, final Printer printer) { - super(Opcodes.ASM7_EXPERIMENTAL, fieldVisitor); + super(Opcodes.ASM7, fieldVisitor); this.p = printer; } diff --git a/asm-util/src/main/java/org/objectweb/asm/util/TraceMethodVisitor.java b/asm-util/src/main/java/org/objectweb/asm/util/TraceMethodVisitor.java index 0cff0f8306d8b7573ca5f9cb896ffb0bf2c86ebb..49e46b934add0644df1ba567d586cbd197e2887e 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/TraceMethodVisitor.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/TraceMethodVisitor.java @@ -61,7 +61,7 @@ public final class TraceMethodVisitor extends MethodVisitor { * @param printer the printer to convert the visited method into text. */ public TraceMethodVisitor(final MethodVisitor methodVisitor, final Printer printer) { - super(Opcodes.ASM7_EXPERIMENTAL, methodVisitor); + super(Opcodes.ASM7, methodVisitor); this.p = printer; } diff --git a/asm-util/src/main/java/org/objectweb/asm/util/TraceModuleVisitor.java b/asm-util/src/main/java/org/objectweb/asm/util/TraceModuleVisitor.java index 55f57419769d640bffa9ed0f77b4c9f2ef1ff548..32bb061156fb0cb729162644ff2c7db8cf5dfd87 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/TraceModuleVisitor.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/TraceModuleVisitor.java @@ -56,7 +56,7 @@ public final class TraceModuleVisitor extends ModuleVisitor { * @param printer the printer to convert the visited module into text. */ public TraceModuleVisitor(final ModuleVisitor moduleVisitor, final Printer printer) { - super(Opcodes.ASM7_EXPERIMENTAL, moduleVisitor); + super(Opcodes.ASM7, moduleVisitor); this.p = printer; } diff --git a/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java b/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java index ffab3ac73685a06a4c7b7c4d54a2395f6430071f..79b142e59d8c9c31616ed820e439072018ddba37 100644 --- a/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java +++ b/asm-util/src/main/java/org/objectweb/asm/util/TraceSignatureVisitor.java @@ -90,13 +90,13 @@ public final class TraceSignatureVisitor extends SignatureVisitor { * @param accessFlags for class type signatures, the access flags of the class. */ public TraceSignatureVisitor(final int accessFlags) { - super(Opcodes.ASM7_EXPERIMENTAL); + super(Opcodes.ASM7); this.isInterface = (accessFlags & Opcodes.ACC_INTERFACE) != 0; this.declaration = new StringBuilder(); } private TraceSignatureVisitor(final StringBuilder stringBuilder) { - super(Opcodes.ASM7_EXPERIMENTAL); + super(Opcodes.ASM7); this.isInterface = false; this.declaration = stringBuilder; } diff --git a/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java b/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java index 52833698334e1ec3bf8e08959475b134b391194d..77277409f63adfe896151014f1dd09159e223a55 100644 --- a/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java +++ b/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java @@ -253,7 +253,7 @@ public class CheckMethodAdapterTest extends AsmTest implements Opcodes { ClassReader classReader = new ClassReader("java.lang.Object"); ClassWriter classWriter = new ClassWriter(classReader, ClassWriter.COMPUTE_MAXS); ClassVisitor classVisitor = - new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL, classWriter) { + new ClassVisitor(Opcodes.ASM7, classWriter) { @Override public MethodVisitor visitMethod( final int access, diff --git a/asm-util/src/test/java/org/objectweb/asm/util/PrinterTest.java b/asm-util/src/test/java/org/objectweb/asm/util/PrinterTest.java index 65468f89a8b85e5d31487d9a3dabdde562bfac8e..b9471589f6d2667222e4aefe4e6beb72e49603db 100644 --- a/asm-util/src/test/java/org/objectweb/asm/util/PrinterTest.java +++ b/asm-util/src/test/java/org/objectweb/asm/util/PrinterTest.java @@ -269,7 +269,7 @@ public class PrinterTest { @Test public void testUnsupportedOperations() { - Printer printer = new StubPrinter(Opcodes.ASM7_EXPERIMENTAL); + Printer printer = new StubPrinter(Opcodes.ASM7); assertThrows(UnsupportedOperationException.class, () -> printer.visitModule(null, 0, null)); assertThrows(UnsupportedOperationException.class, () -> printer.visitModule(null, 0, null)); assertThrows( diff --git a/asm/src/main/java/org/objectweb/asm/AnnotationVisitor.java b/asm/src/main/java/org/objectweb/asm/AnnotationVisitor.java index 7ce7ffea1e5f9480d11f79f10ab1a4823bceee74..1f173b3a2d08423488d2271318d79fe46c412cc3 100644 --- a/asm/src/main/java/org/objectweb/asm/AnnotationVisitor.java +++ b/asm/src/main/java/org/objectweb/asm/AnnotationVisitor.java @@ -39,7 +39,7 @@ public abstract class AnnotationVisitor { /** * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -50,8 +50,7 @@ public abstract class AnnotationVisitor { * Constructs a new {@link AnnotationVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public AnnotationVisitor(final int api) { this(api, null); @@ -61,16 +60,12 @@ public abstract class AnnotationVisitor { * Constructs a new {@link AnnotationVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param annotationVisitor the annotation visitor to which this visitor must delegate method * calls. May be null. */ public AnnotationVisitor(final int api, final AnnotationVisitor annotationVisitor) { - if (api != Opcodes.ASM6 - && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM7_EXPERIMENTAL) { + if (api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 && api != Opcodes.ASM7) { throw new IllegalArgumentException(); } this.api = api; diff --git a/asm/src/main/java/org/objectweb/asm/AnnotationWriter.java b/asm/src/main/java/org/objectweb/asm/AnnotationWriter.java index 318ee00c6ed803cee9893f43f22bbd8729a43117..0c19ad73885b1cca2278bba4bd43ba3b1798aff0 100644 --- a/asm/src/main/java/org/objectweb/asm/AnnotationWriter.java +++ b/asm/src/main/java/org/objectweb/asm/AnnotationWriter.java @@ -112,7 +112,7 @@ final class AnnotationWriter extends AnnotationVisitor { final boolean useNamedValues, final ByteVector annotation, final AnnotationWriter previousAnnotation) { - super(Opcodes.ASM6); + super(Opcodes.ASM7); this.symbolTable = symbolTable; this.useNamedValues = useNamedValues; this.annotation = annotation; diff --git a/asm/src/main/java/org/objectweb/asm/ClassReader.java b/asm/src/main/java/org/objectweb/asm/ClassReader.java index 3a0ee789fbbe292b36008a0d64e394c7d7c39a07..d946997d7442e5a98d2e32c18289267d9bf8bc94 100644 --- a/asm/src/main/java/org/objectweb/asm/ClassReader.java +++ b/asm/src/main/java/org/objectweb/asm/ClassReader.java @@ -520,7 +520,7 @@ public class ClassReader { // Visit the NestHost attribute. if (nestHostClass != null) { - classVisitor.visitNestHostExperimental(nestHostClass); + classVisitor.visitNestHost(nestHostClass); } // Visit the EnclosingMethod attribute. @@ -630,7 +630,7 @@ public class ClassReader { int numberOfNestMembers = readUnsignedShort(nestMembersOffset); int currentNestMemberOffset = nestMembersOffset + 2; while (numberOfNestMembers-- > 0) { - classVisitor.visitNestMemberExperimental(readClass(currentNestMemberOffset, charBuffer)); + classVisitor.visitNestMember(readClass(currentNestMemberOffset, charBuffer)); currentNestMemberOffset += 2; } } diff --git a/asm/src/main/java/org/objectweb/asm/ClassVisitor.java b/asm/src/main/java/org/objectweb/asm/ClassVisitor.java index 93e3f2e1f43ee19ed2b648ea4040f96f927f5c00..aebead2e4d6f746daf2e777798b402fab0c88fa3 100644 --- a/asm/src/main/java/org/objectweb/asm/ClassVisitor.java +++ b/asm/src/main/java/org/objectweb/asm/ClassVisitor.java @@ -40,7 +40,7 @@ public abstract class ClassVisitor { /** * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -51,8 +51,7 @@ public abstract class ClassVisitor { * Constructs a new {@link ClassVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public ClassVisitor(final int api) { this(api, null); @@ -62,16 +61,12 @@ public abstract class ClassVisitor { * Constructs a new {@link ClassVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param classVisitor the class visitor to which this visitor must delegate method calls. May be * null. */ public ClassVisitor(final int api, final ClassVisitor classVisitor) { - if (api != Opcodes.ASM6 - && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM7_EXPERIMENTAL) { + if (api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 && api != Opcodes.ASM7) { throw new IllegalArgumentException(); } this.api = api; @@ -141,24 +136,21 @@ public abstract class ClassVisitor { } /** - * Experimental, use at your own risk. This method will be renamed when it becomes stable, this - * will break existing code using it. Visits the nest host class of the class. A nest is a set - * of classes of the same package that share access to their private members. One of these - * classes, called the host, lists the other members of the nest, which in turn should link to the - * host of their nest. This method must be called only once and only if the visited class is a - * non-host member of a nest. A class is implicitly its own nest, so it's invalid to call this - * method with the visited class name as argument. + * Visits the nest host class of the class. A nest is a set of classes of the same package that + * share access to their private members. One of these classes, called the host, lists the other + * members of the nest, which in turn should link to the host of their nest. This method must be + * called only once and only if the visited class is a non-host member of a nest. A class is + * implicitly its own nest, so it's invalid to call this method with the visited class name as + * argument. * * @param nestHost the internal name of the host class of the nest. - * @deprecated This API is experimental. */ - @Deprecated - public void visitNestHostExperimental(final String nestHost) { - if (api < Opcodes.ASM7_EXPERIMENTAL) { + public void visitNestHost(final String nestHost) { + if (api < Opcodes.ASM7) { throw new UnsupportedOperationException(); } if (cv != null) { - cv.visitNestHostExperimental(nestHost); + cv.visitNestHost(nestHost); } } @@ -231,24 +223,20 @@ public abstract class ClassVisitor { } /** - * Experimental, use at your own risk. This method will be renamed when it becomes stable, this - * will break existing code using it. Visits a member of the nest. A nest is a set of classes - * of the same package that share access to their private members. One of these classes, called - * the host, lists the other members of the nest, which in turn should link to the host of their - * nest. This method must be called only if the visited class is the host of a nest. A nest host - * is implicitly a member of its own nest, so it's invalid to call this method with the visited - * class name as argument. + * Visits a member of the nest. A nest is a set of classes of the same package that share access + * to their private members. One of these classes, called the host, lists the other members of the + * nest, which in turn should link to the host of their nest. This method must be called only if + * the visited class is the host of a nest. A nest host is implicitly a member of its own nest, so + * it's invalid to call this method with the visited class name as argument. * * @param nestMember the internal name of a nest member. - * @deprecated This API is experimental. */ - @Deprecated - public void visitNestMemberExperimental(final String nestMember) { - if (api < Opcodes.ASM7_EXPERIMENTAL) { + public void visitNestMember(final String nestMember) { + if (api < Opcodes.ASM7) { throw new UnsupportedOperationException(); } if (cv != null) { - cv.visitNestMemberExperimental(nestMember); + cv.visitNestMember(nestMember); } } diff --git a/asm/src/main/java/org/objectweb/asm/ClassWriter.java b/asm/src/main/java/org/objectweb/asm/ClassWriter.java index 4931b6e4310493bb4d4d33f01f7838e7e88f8dba..6d3341f5f73151ae9f666aba641330ba7807f541 100644 --- a/asm/src/main/java/org/objectweb/asm/ClassWriter.java +++ b/asm/src/main/java/org/objectweb/asm/ClassWriter.java @@ -234,7 +234,7 @@ public class ClassWriter extends ClassVisitor { * maximum stack size nor the stack frames will be computed for these methods. */ public ClassWriter(final ClassReader classReader, final int flags) { - super(Opcodes.ASM6); + super(Opcodes.ASM7); symbolTable = classReader == null ? new SymbolTable(this) : new SymbolTable(this, classReader); if ((flags & COMPUTE_FRAMES) != 0) { this.compute = MethodWriter.COMPUTE_ALL_FRAMES; @@ -298,7 +298,7 @@ public class ClassWriter extends ClassVisitor { } @Override - public void visitNestHostExperimental(final String nestHost) { + public void visitNestHost(final String nestHost) { nestHostClassIndex = symbolTable.addConstantClass(nestHost).index; } @@ -355,7 +355,7 @@ public class ClassWriter extends ClassVisitor { } @Override - public void visitNestMemberExperimental(final String nestMember) { + public void visitNestMember(final String nestMember) { if (nestMemberClasses == null) { nestMemberClasses = new ByteVector(); } diff --git a/asm/src/main/java/org/objectweb/asm/ConstantDynamic.java b/asm/src/main/java/org/objectweb/asm/ConstantDynamic.java index 77cc7cfcdfc75503a3bd12f518807a06a35dec91..7173e6d1f2bdf6df3a8678d0a7be6c69ced851aa 100644 --- a/asm/src/main/java/org/objectweb/asm/ConstantDynamic.java +++ b/asm/src/main/java/org/objectweb/asm/ConstantDynamic.java @@ -33,9 +33,7 @@ import java.util.Arrays; * A constant whose value is computed at runtime, with a bootstrap method. * * @author Remi Forax - * @deprecated This API is experimental. */ -@Deprecated public final class ConstantDynamic { /** The constant name (can be arbitrary). */ diff --git a/asm/src/main/java/org/objectweb/asm/FieldVisitor.java b/asm/src/main/java/org/objectweb/asm/FieldVisitor.java index 39d18221f1d64bf2066fbc5c9c1c3cdd86e8e24c..5682d9e66645f33240f5c309a166c4d1eba8b694 100644 --- a/asm/src/main/java/org/objectweb/asm/FieldVisitor.java +++ b/asm/src/main/java/org/objectweb/asm/FieldVisitor.java @@ -38,7 +38,7 @@ public abstract class FieldVisitor { /** * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -49,8 +49,7 @@ public abstract class FieldVisitor { * Constructs a new {@link FieldVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public FieldVisitor(final int api) { this(api, null); @@ -60,16 +59,12 @@ public abstract class FieldVisitor { * Constructs a new {@link FieldVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param fieldVisitor the field visitor to which this visitor must delegate method calls. May be * null. */ public FieldVisitor(final int api, final FieldVisitor fieldVisitor) { - if (api != Opcodes.ASM6 - && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM7_EXPERIMENTAL) { + if (api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 && api != Opcodes.ASM7) { throw new IllegalArgumentException(); } this.api = api; diff --git a/asm/src/main/java/org/objectweb/asm/FieldWriter.java b/asm/src/main/java/org/objectweb/asm/FieldWriter.java index 3d43d9e6beaee8a82aeeaaec5ece77943a061c46..b167c67420c45a4839e5f953fe9ab3424c4dd0aa 100644 --- a/asm/src/main/java/org/objectweb/asm/FieldWriter.java +++ b/asm/src/main/java/org/objectweb/asm/FieldWriter.java @@ -124,7 +124,7 @@ final class FieldWriter extends FieldVisitor { final String descriptor, final String signature, final Object constantValue) { - super(Opcodes.ASM6); + super(Opcodes.ASM7); this.symbolTable = symbolTable; this.accessFlags = access; this.nameIndex = symbolTable.addConstantUtf8(name); diff --git a/asm/src/main/java/org/objectweb/asm/MethodVisitor.java b/asm/src/main/java/org/objectweb/asm/MethodVisitor.java index 658b806861fc8d7ec296f5496c9219504ad09035..f6d95d4d35fc1f4ef00daa041c4bbc583dff509c 100644 --- a/asm/src/main/java/org/objectweb/asm/MethodVisitor.java +++ b/asm/src/main/java/org/objectweb/asm/MethodVisitor.java @@ -52,7 +52,7 @@ public abstract class MethodVisitor { /** * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -63,8 +63,7 @@ public abstract class MethodVisitor { * Constructs a new {@link MethodVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public MethodVisitor(final int api) { this(api, null); @@ -74,16 +73,12 @@ public abstract class MethodVisitor { * Constructs a new {@link MethodVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param methodVisitor the method visitor to which this visitor must delegate method calls. May * be null. */ public MethodVisitor(final int api, final MethodVisitor methodVisitor) { - if (api != Opcodes.ASM6 - && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM7_EXPERIMENTAL) { + if (api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 && api != Opcodes.ASM7) { throw new IllegalArgumentException(); } this.api = api; @@ -543,7 +538,7 @@ public abstract class MethodVisitor { || (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) { throw new UnsupportedOperationException(REQUIRES_ASM5); } - if (api != Opcodes.ASM7_EXPERIMENTAL && value instanceof ConstantDynamic) { + if (api != Opcodes.ASM7 && value instanceof ConstantDynamic) { throw new UnsupportedOperationException("This feature requires ASM7"); } if (mv != null) { diff --git a/asm/src/main/java/org/objectweb/asm/MethodWriter.java b/asm/src/main/java/org/objectweb/asm/MethodWriter.java index bc2d296ef2808015aed302769bc8eb6da8ce3c72..34e875484ee012a248b209ffb2a8be379e23b878 100644 --- a/asm/src/main/java/org/objectweb/asm/MethodWriter.java +++ b/asm/src/main/java/org/objectweb/asm/MethodWriter.java @@ -593,7 +593,7 @@ final class MethodWriter extends MethodVisitor { final String signature, final String[] exceptions, final int compute) { - super(Opcodes.ASM6); + super(Opcodes.ASM7); this.symbolTable = symbolTable; this.accessFlags = "".equals(name) ? access | Constants.ACC_CONSTRUCTOR : access; this.nameIndex = symbolTable.addConstantUtf8(name); diff --git a/asm/src/main/java/org/objectweb/asm/ModuleVisitor.java b/asm/src/main/java/org/objectweb/asm/ModuleVisitor.java index 796ad5ba9bd185aa016286866abb55e9cacde381..415a43c2b602d5c4492fcb1b15c3bc46fb47be92 100644 --- a/asm/src/main/java/org/objectweb/asm/ModuleVisitor.java +++ b/asm/src/main/java/org/objectweb/asm/ModuleVisitor.java @@ -38,7 +38,7 @@ package org.objectweb.asm; public abstract class ModuleVisitor { /** * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -49,7 +49,7 @@ public abstract class ModuleVisitor { * Constructs a new {@link ModuleVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM6} - * or {@link Opcodes#ASM7_EXPERIMENTAL}. + * or {@link Opcodes#ASM7}. */ public ModuleVisitor(final int api) { this(api, null); @@ -59,12 +59,12 @@ public abstract class ModuleVisitor { * Constructs a new {@link ModuleVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM6} - * or {@link Opcodes#ASM7_EXPERIMENTAL}. + * or {@link Opcodes#ASM7}. * @param moduleVisitor the module visitor to which this visitor must delegate method calls. May * be null. */ public ModuleVisitor(final int api, final ModuleVisitor moduleVisitor) { - if (api != Opcodes.ASM6 && api != Opcodes.ASM7_EXPERIMENTAL) { + if (api != Opcodes.ASM6 && api != Opcodes.ASM7) { throw new IllegalArgumentException(); } this.api = api; diff --git a/asm/src/main/java/org/objectweb/asm/ModuleWriter.java b/asm/src/main/java/org/objectweb/asm/ModuleWriter.java index aa5bd17676f0bd7302986c6c140fd09ea75718b7..7658734db686096ddfe79a9fd2be1fec2f16c019 100644 --- a/asm/src/main/java/org/objectweb/asm/ModuleWriter.java +++ b/asm/src/main/java/org/objectweb/asm/ModuleWriter.java @@ -94,7 +94,7 @@ final class ModuleWriter extends ModuleVisitor { private int mainClassIndex; ModuleWriter(final SymbolTable symbolTable, final int name, final int access, final int version) { - super(Opcodes.ASM6); + super(Opcodes.ASM7); this.symbolTable = symbolTable; this.moduleNameIndex = name; this.moduleFlags = access; diff --git a/asm/src/main/java/org/objectweb/asm/Opcodes.java b/asm/src/main/java/org/objectweb/asm/Opcodes.java index d179706f3436ab0907165cc7a0c84b41c2ec28b6..652db8667ab39a61a0ad4ae2590473509eac678a 100644 --- a/asm/src/main/java/org/objectweb/asm/Opcodes.java +++ b/asm/src/main/java/org/objectweb/asm/Opcodes.java @@ -45,14 +45,7 @@ public interface Opcodes { int ASM4 = 4 << 16 | 0 << 8; int ASM5 = 5 << 16 | 0 << 8; int ASM6 = 6 << 16 | 0 << 8; - - /** - * Experimental, use at your own risk. This field will be renamed when it becomes stable, this - * will break existing code using it. - * - * @deprecated This API is experimental. - */ - @Deprecated int ASM7_EXPERIMENTAL = 1 << 24 | 7 << 16 | 0 << 8; + int ASM7 = 7 << 16 | 0 << 8; // Java ClassFile versions (the minor version is stored in the 16 most // significant bits, and the @@ -74,12 +67,10 @@ public interface Opcodes { /** * Version flag indicating that the class is using 'preview' features. * - *

{@code version & V_PREVIEW_EXPERIMENTAL == V_PREVIEW_EXPERIMENTAL} tests if a version is - * flagged with {@code V_PREVIEW_EXPERIMENTAL}. - * - * @deprecated This API is experimental. + *

{@code version & V_PREVIEW == V_PREVIEW} tests if a version is flagged with {@code + * V_PREVIEW}. */ - @Deprecated int V_PREVIEW_EXPERIMENTAL = 0xFFFF0000; + int V_PREVIEW = 0xFFFF0000; // Access flags values, defined in // - https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1 diff --git a/asm/src/main/java/org/objectweb/asm/signature/SignatureVisitor.java b/asm/src/main/java/org/objectweb/asm/signature/SignatureVisitor.java index db0ed0ca7ab13873e6cad51977d1957e16be2aa2..3ae9fe31ebb3ac389b3e6b86114e7f8c9cc424b6 100644 --- a/asm/src/main/java/org/objectweb/asm/signature/SignatureVisitor.java +++ b/asm/src/main/java/org/objectweb/asm/signature/SignatureVisitor.java @@ -61,7 +61,7 @@ public abstract class SignatureVisitor { /** * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -69,14 +69,10 @@ public abstract class SignatureVisitor { * Constructs a new {@link SignatureVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link - * Opcodes#ASM7_EXPERIMENTAL}. + * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ public SignatureVisitor(final int api) { - if (api != Opcodes.ASM6 - && api != Opcodes.ASM5 - && api != Opcodes.ASM4 - && api != Opcodes.ASM7_EXPERIMENTAL) { + if (api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 && api != Opcodes.ASM7) { throw new IllegalArgumentException(); } this.api = api; diff --git a/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java b/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java index 433a3e9c25dc6003e2e8d8f213c064ffee52a057..7a87ed7163c1935cb43c5178c5efefdbc4b09e1a 100644 --- a/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java +++ b/asm/src/main/java/org/objectweb/asm/signature/SignatureWriter.java @@ -70,7 +70,7 @@ public class SignatureWriter extends SignatureVisitor { /** Constructs a new {@link SignatureWriter}. */ public SignatureWriter() { - super(Opcodes.ASM6); + super(Opcodes.ASM7); } // ----------------------------------------------------------------------------------------------- diff --git a/asm/src/test/java/org/objectweb/asm/ClassReaderTest.java b/asm/src/test/java/org/objectweb/asm/ClassReaderTest.java index 51683b9f8e2822e3584b23e02c7f269079cb167a..396775bbe60b62489a34013a72d7e838ba1da79d 100644 --- a/asm/src/test/java/org/objectweb/asm/ClassReaderTest.java +++ b/asm/src/test/java/org/objectweb/asm/ClassReaderTest.java @@ -223,7 +223,7 @@ public class ClassReaderTest extends AsmTest implements Opcodes { assertThat(() -> classReader.accept(classVisitor, 0)) .succeedsOrThrows(RuntimeException.class) .when( - (hasNestHostOrMembers && apiParameter.value() < ASM7_EXPERIMENTAL) + (hasNestHostOrMembers && apiParameter.value() < ASM7) || (hasModules && apiParameter.value() < ASM6) || (hasTypeAnnotations && apiParameter.value() < ASM5)); } @@ -389,10 +389,10 @@ public class ClassReaderTest extends AsmTest implements Opcodes { } @Override - public void visitNestHostExperimental(final String nestHost) {} + public void visitNestHost(final String nestHost) {} @Override - public void visitNestMemberExperimental(final String nestMember) {} + public void visitNestMember(final String nestMember) {} }; classReader.accept(classVisitor, 0); } @@ -402,7 +402,7 @@ public class ClassReaderTest extends AsmTest implements Opcodes { final AtomicBoolean success = new AtomicBoolean(false); ClassReader classReader = new ClassReader(PrecompiledClass.JDK5_LOCAL_CLASS.getBytes()); classReader.accept( - new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL) { + new ClassVisitor(Opcodes.ASM7) { @Override public MethodVisitor visitMethod( final int access, @@ -431,7 +431,7 @@ public class ClassReaderTest extends AsmTest implements Opcodes { public void testPreviewMinorVersion() { ClassReader classReader = new ClassReader(PrecompiledClass.JDK11_ALL_INSTRUCTIONS.getBytes()); classReader.accept( - new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL) { + new ClassVisitor(Opcodes.ASM7) { @Override public void visit( int version, @@ -440,8 +440,7 @@ public class ClassReaderTest extends AsmTest implements Opcodes { String signature, String superName, String[] interfaces) { - assertTrue( - (version & Opcodes.V_PREVIEW_EXPERIMENTAL) == Opcodes.V_PREVIEW_EXPERIMENTAL); + assertTrue((version & Opcodes.V_PREVIEW) == Opcodes.V_PREVIEW); } }, 0); @@ -461,11 +460,11 @@ public class ClassReaderTest extends AsmTest implements Opcodes { || invalidClass == InvalidClass.INVALID_BYTECODE_OFFSET) { assertThrows( ArrayIndexOutOfBoundsException.class, - () -> classReader.accept(new EmptyClassVisitor(ASM7_EXPERIMENTAL), 0)); + () -> classReader.accept(new EmptyClassVisitor(ASM7), 0)); } else { assertThrows( IllegalArgumentException.class, - () -> classReader.accept(new EmptyClassVisitor(ASM7_EXPERIMENTAL), 0)); + () -> classReader.accept(new EmptyClassVisitor(ASM7), 0)); } } } diff --git a/asm/src/test/java/org/objectweb/asm/ClassVisitorTest.java b/asm/src/test/java/org/objectweb/asm/ClassVisitorTest.java index 84406fd3f6073cc26923420fdec26c47216a330c..0e89c10f4320b8f1fd45d0538e461fcef5fd25b1 100644 --- a/asm/src/test/java/org/objectweb/asm/ClassVisitorTest.java +++ b/asm/src/test/java/org/objectweb/asm/ClassVisitorTest.java @@ -366,7 +366,7 @@ public class ClassVisitorTest extends AsmTest { private static class ChangeExceptionAdapter extends ClassVisitor { ChangeExceptionAdapter(final ClassVisitor classVisitor) { - super(Opcodes.ASM7_EXPERIMENTAL, classVisitor); + super(Opcodes.ASM7, classVisitor); } @Override @@ -388,7 +388,7 @@ public class ClassVisitorTest extends AsmTest { private final int newVersion; ChangeVersionAdapter(final ClassVisitor classVisitor, final int newVersion) { - super(Opcodes.ASM7_EXPERIMENTAL, classVisitor); + super(Opcodes.ASM7, classVisitor); this.newVersion = newVersion; } @@ -409,7 +409,7 @@ public class ClassVisitorTest extends AsmTest { private final int accessFlags; ChangeAccessAdapter(final ClassVisitor classVisitor, final int accessFlags) { - super(Opcodes.ASM7_EXPERIMENTAL, classVisitor); + super(Opcodes.ASM7, classVisitor); this.accessFlags = accessFlags; } @@ -430,7 +430,7 @@ public class ClassVisitorTest extends AsmTest { private final boolean visibilityValue; RemoveAnnotationAdapter(final ClassVisitor classVisitor, final boolean visibilityValue) { - super(Opcodes.ASM7_EXPERIMENTAL, classVisitor); + super(Opcodes.ASM7, classVisitor); this.visibilityValue = visibilityValue; } @@ -571,7 +571,7 @@ public class ClassVisitorTest extends AsmTest { private static class AddParameterAdapter extends ClassVisitor { public AddParameterAdapter(final ClassVisitor classVisitor) { - super(Opcodes.ASM7_EXPERIMENTAL, classVisitor); + super(Opcodes.ASM7, classVisitor); } @Override diff --git a/asm/src/test/java/org/objectweb/asm/ClassWriterTest.java b/asm/src/test/java/org/objectweb/asm/ClassWriterTest.java index 0ba9d8cd1f54da6e4c9265a71d9bc4a36dbd4267..0dff255f55b9567c3280b1c191604d53c4c6c9aa 100644 --- a/asm/src/test/java/org/objectweb/asm/ClassWriterTest.java +++ b/asm/src/test/java/org/objectweb/asm/ClassWriterTest.java @@ -511,7 +511,7 @@ public class ClassWriterTest extends AsmTest { ClassReader classReader = new ClassReader(classFile); ClassWriter classWriter = new ClassWriter(0); ClassVisitor classVisitor = - new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL, classWriter) { + new ClassVisitor(Opcodes.ASM7, classWriter) { @Override public ModuleVisitor visitModule( diff --git a/asm/src/test/java/org/objectweb/asm/ConstantsTest.java b/asm/src/test/java/org/objectweb/asm/ConstantsTest.java index 4d72416ccda53f877782112ef13889a1dd5dbf81..81ee07b1bea4d98b5d886f990a8b9b0da31c5452 100644 --- a/asm/src/test/java/org/objectweb/asm/ConstantsTest.java +++ b/asm/src/test/java/org/objectweb/asm/ConstantsTest.java @@ -63,11 +63,11 @@ public class ConstantsTest { case "ASM4": case "ASM5": case "ASM6": - case "ASM7_EXPERIMENTAL": + case "ASM7": assertFalse(asmVersions.contains(field.getInt(null))); asmVersions.add(field.getInt(null)); break; - case "V_PREVIEW_EXPERIMENTAL": + case "V_PREVIEW": case "V1_1": case "V1_2": case "V1_3": diff --git a/asm/src/test/java/org/objectweb/asm/signature/SignatureReaderTest.java b/asm/src/test/java/org/objectweb/asm/signature/SignatureReaderTest.java index d44d48795bd7fa6dd9a1512c50c8c391bc6f60d5..584058494fded354f3b9d833baad81cd475a30bf 100644 --- a/asm/src/test/java/org/objectweb/asm/signature/SignatureReaderTest.java +++ b/asm/src/test/java/org/objectweb/asm/signature/SignatureReaderTest.java @@ -103,6 +103,6 @@ public class SignatureReaderTest extends AsmTest { public void testReadInvalidSignature() { assertThrows( IllegalArgumentException.class, - () -> new SignatureReader("-").accept(new SignatureVisitor(Opcodes.ASM7_EXPERIMENTAL) {})); + () -> new SignatureReader("-").accept(new SignatureVisitor(Opcodes.ASM7) {})); } } diff --git a/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/TypeBenchmark.java b/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/TypeBenchmark.java index d7107c19f7af5f82710b9da9d5bb744abdbb5075..dc631cf17a10e83de8abc67dd5f36292a471dbdf 100644 --- a/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/TypeBenchmark.java +++ b/benchmarks/src/jmh/java/org/objectweb/asm/benchmarks/TypeBenchmark.java @@ -88,7 +88,7 @@ public class TypeBenchmark extends AbstractBenchmark { }; CollectTypesVisitor() { - super(Opcodes.ASM6); + super(Opcodes.ASM7); } @Override diff --git a/build.gradle b/build.gradle index 730bddbdd4795bc9c2475d44c4538091ea7d6b83..4d5c2c63e266a75923480a58bf7ae0e36fc39cdb 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,7 @@ subprojects { apply plugin: 'jacoco' def snapshotSuffix = rootProject.hasProperty('release') ? '' : '-SNAPSHOT' group = 'org.ow2.asm' - version = '6.2.1' + snapshotSuffix + version = '7.0-beta' + snapshotSuffix sourceCompatibility = '1.6' targetCompatibility = '1.6' test { useJUnitPlatform() } diff --git a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java index f76ef2ef10a8427be4b27aea158ff7122a08cb25..6041701136b35c1252ff20a9e07e587d49f94476 100644 --- a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java +++ b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java @@ -154,7 +154,7 @@ public class Retrofitter { static class ClassRetrofitter extends ClassVisitor { public ClassRetrofitter(ClassVisitor classVisitor) { - super(Opcodes.ASM7_EXPERIMENTAL, classVisitor); + super(Opcodes.ASM7, classVisitor); } @Override