Commit cb7d8cfc authored by Eric Bruneton's avatar Eric Bruneton

Prepare for the next version, 7.0-beta.

parent 73d498fb
Pipeline #2791 passed with stage
in 7 minutes and 38 seconds
...@@ -72,7 +72,7 @@ public class BasicInterpreter extends Interpreter<BasicValue> implements Opcodes ...@@ -72,7 +72,7 @@ public class BasicInterpreter extends Interpreter<BasicValue> implements Opcodes
* *
* @param api the ASM API version supported by this interpreter. Must be one of {@link * @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#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) { protected BasicInterpreter(final int api) {
super(api); super(api);
......
...@@ -58,7 +58,7 @@ public class BasicVerifier extends BasicInterpreter { ...@@ -58,7 +58,7 @@ public class BasicVerifier extends BasicInterpreter {
* *
* @param api the ASM API version supported by this interpreter. Must be one of {@link * @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#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) { protected BasicVerifier(final int api) {
super(api); super(api);
......
...@@ -47,7 +47,7 @@ public abstract class Interpreter<V extends Value> { ...@@ -47,7 +47,7 @@ public abstract class Interpreter<V extends Value> {
/** /**
* The ASM API version supported by this interpreter. The value of this field must be one of * 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 * {@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; protected final int api;
...@@ -56,7 +56,7 @@ public abstract class Interpreter<V extends Value> { ...@@ -56,7 +56,7 @@ public abstract class Interpreter<V extends Value> {
* *
* @param api the ASM API version supported by this interpreter. Must be one of {@link * @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#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) { protected Interpreter(final int api) {
this.api = api; this.api = api;
......
...@@ -105,7 +105,7 @@ public class SimpleVerifier extends BasicVerifier { ...@@ -105,7 +105,7 @@ public class SimpleVerifier extends BasicVerifier {
* *
* @param api the ASM API version supported by this verifier. Must be one of {@link * @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#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 currentClass the type of the class to be verified.
* @param currentSuperClass the type of the super class 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 * @param currentClassInterfaces the types of the interfaces directly implemented by the class to
......
...@@ -62,7 +62,7 @@ public class SourceInterpreter extends Interpreter<SourceValue> implements Opcod ...@@ -62,7 +62,7 @@ public class SourceInterpreter extends Interpreter<SourceValue> implements Opcod
* *
* @param api the ASM API version supported by this interpreter. Must be one of {@link * @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#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) { protected SourceInterpreter(final int api) {
super(api); super(api);
......
...@@ -89,7 +89,7 @@ public class BasicInterpreterTest extends AsmTest { ...@@ -89,7 +89,7 @@ public class BasicInterpreterTest extends AsmTest {
for (MethodNode methodNode : classNode.methods) { for (MethodNode methodNode : classNode.methods) {
Analyzer<BasicValue> analyzer = Analyzer<BasicValue> analyzer =
new Analyzer<BasicValue>( new Analyzer<BasicValue>(
new BasicInterpreter(Opcodes.ASM7_EXPERIMENTAL) { new BasicInterpreter(Opcodes.ASM7) {
@Override @Override
public BasicValue merge(final BasicValue value1, final BasicValue value2) { public BasicValue merge(final BasicValue value1, final BasicValue value2) {
return new BasicValue(super.merge(value1, value2).getType()); return new BasicValue(super.merge(value1, value2).getType());
......
...@@ -497,8 +497,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes { ...@@ -497,8 +497,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes {
Type baseType = Type.getObjectType("C"); Type baseType = Type.getObjectType("C");
Type superType = Type.getObjectType("D"); Type superType = Type.getObjectType("D");
Type interfaceType = Type.getObjectType("I"); Type interfaceType = Type.getObjectType("I");
new SimpleVerifier( new SimpleVerifier(ASM7, baseType, superType, Arrays.asList(interfaceType), false) {
ASM7_EXPERIMENTAL, baseType, superType, Arrays.asList(interfaceType), false) {
void test() { void test() {
assertTrue(isAssignableFrom(baseType, baseType)); assertTrue(isAssignableFrom(baseType, baseType));
...@@ -516,7 +515,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes { ...@@ -516,7 +515,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes {
} }
}.test(); }.test();
new SimpleVerifier(ASM7_EXPERIMENTAL, interfaceType, null, null, true) { new SimpleVerifier(ASM7, interfaceType, null, null, true) {
void test() { void test() {
assertTrue(isAssignableFrom(interfaceType, baseType)); assertTrue(isAssignableFrom(interfaceType, baseType));
......
...@@ -97,8 +97,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes ...@@ -97,8 +97,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes
* Constructs a new {@link AdviceAdapter}. * Constructs a new {@link AdviceAdapter}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @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#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM7_EXPERIMENTAL}.
* @param methodVisitor the method visitor to which this adapter delegates calls. * @param methodVisitor the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}). * @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name. * @param name the method's name.
......
...@@ -116,7 +116,7 @@ public class AnalyzerAdapter extends MethodVisitor { ...@@ -116,7 +116,7 @@ public class AnalyzerAdapter extends MethodVisitor {
final String name, final String name,
final String descriptor, final String descriptor,
final MethodVisitor methodVisitor) { final MethodVisitor methodVisitor) {
this(Opcodes.ASM6, owner, access, name, descriptor, methodVisitor); this(Opcodes.ASM7, owner, access, name, descriptor, methodVisitor);
if (getClass() != AnalyzerAdapter.class) { if (getClass() != AnalyzerAdapter.class) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
...@@ -126,8 +126,7 @@ public class AnalyzerAdapter extends MethodVisitor { ...@@ -126,8 +126,7 @@ public class AnalyzerAdapter extends MethodVisitor {
* Constructs a new {@link AnalyzerAdapter}. * Constructs a new {@link AnalyzerAdapter}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @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#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM7_EXPERIMENTAL}.
* @param owner the owner's class name. * @param owner the owner's class name.
* @param access the method's access flags (see {@link Opcodes}). * @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name. * @param name the method's name.
......
...@@ -49,7 +49,7 @@ public class AnnotationRemapper extends AnnotationVisitor { ...@@ -49,7 +49,7 @@ public class AnnotationRemapper extends AnnotationVisitor {
* @param remapper the remapper to use to remap the types in the visited annotation. * @param remapper the remapper to use to remap the types in the visited annotation.
*/ */
public AnnotationRemapper(final AnnotationVisitor annotationVisitor, final Remapper remapper) { public AnnotationRemapper(final AnnotationVisitor annotationVisitor, final Remapper remapper) {
this(Opcodes.ASM6, annotationVisitor, remapper); this(Opcodes.ASM7, annotationVisitor, remapper);
} }
/** /**
......
...@@ -59,7 +59,7 @@ public class ClassRemapper extends ClassVisitor { ...@@ -59,7 +59,7 @@ public class ClassRemapper extends ClassVisitor {
* @param remapper the remapper to use to remap the types in the visited class. * @param remapper the remapper to use to remap the types in the visited class.
*/ */
public ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper) { 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 { ...@@ -67,7 +67,7 @@ public class ClassRemapper extends ClassVisitor {
* *
* @param api the ASM API version supported by this remapper. Must be one of {@link * @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#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 classVisitor the class visitor this remapper must deleted to.
* @param remapper the remapper to use to remap the types in the visited class. * @param remapper the remapper to use to remap the types in the visited class.
*/ */
...@@ -181,13 +181,13 @@ public class ClassRemapper extends ClassVisitor { ...@@ -181,13 +181,13 @@ public class ClassRemapper extends ClassVisitor {
} }
@Override @Override
public void visitNestHostExperimental(final String nestHost) { public void visitNestHost(final String nestHost) {
super.visitNestHostExperimental(remapper.mapType(nestHost)); super.visitNestHost(remapper.mapType(nestHost));
} }
@Override @Override
public void visitNestMemberExperimental(final String nestMember) { public void visitNestMember(final String nestMember) {
super.visitNestMemberExperimental(remapper.mapType(nestMember)); super.visitNestMember(remapper.mapType(nestMember));
} }
/** /**
......
...@@ -47,7 +47,7 @@ public class CodeSizeEvaluator extends MethodVisitor implements Opcodes { ...@@ -47,7 +47,7 @@ public class CodeSizeEvaluator extends MethodVisitor implements Opcodes {
private int maxSize; private int maxSize;
public CodeSizeEvaluator(final MethodVisitor methodVisitor) { public CodeSizeEvaluator(final MethodVisitor methodVisitor) {
this(Opcodes.ASM6, methodVisitor); this(Opcodes.ASM7, methodVisitor);
} }
protected CodeSizeEvaluator(final int api, final MethodVisitor methodVisitor) { protected CodeSizeEvaluator(final int api, final MethodVisitor methodVisitor) {
......
...@@ -51,7 +51,7 @@ public class FieldRemapper extends FieldVisitor { ...@@ -51,7 +51,7 @@ public class FieldRemapper extends FieldVisitor {
* @param remapper the remapper to use to remap the types in the visited field. * @param remapper the remapper to use to remap the types in the visited field.
*/ */
public FieldRemapper(final FieldVisitor fieldVisitor, final Remapper remapper) { public FieldRemapper(final FieldVisitor fieldVisitor, final Remapper remapper) {
this(Opcodes.ASM6, fieldVisitor, remapper); this(Opcodes.ASM7, fieldVisitor, remapper);
} }
/** /**
......
...@@ -201,7 +201,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { ...@@ -201,7 +201,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
final int access, final int access,
final String name, final String name,
final String descriptor) { final String descriptor) {
this(Opcodes.ASM6, methodVisitor, access, name, descriptor); this(Opcodes.ASM7, methodVisitor, access, name, descriptor);
if (getClass() != GeneratorAdapter.class) { if (getClass() != GeneratorAdapter.class) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
...@@ -211,8 +211,7 @@ public class GeneratorAdapter extends LocalVariablesSorter { ...@@ -211,8 +211,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
* Constructs a new {@link GeneratorAdapter}. * Constructs a new {@link GeneratorAdapter}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @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#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM7_EXPERIMENTAL}.
* @param methodVisitor the method visitor to which this adapter delegates calls. * @param methodVisitor the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}). * @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name. * @param name the method's name.
......
...@@ -53,7 +53,7 @@ public class InstructionAdapter extends MethodVisitor { ...@@ -53,7 +53,7 @@ public class InstructionAdapter extends MethodVisitor {
* @throws IllegalStateException If a subclass calls this constructor. * @throws IllegalStateException If a subclass calls this constructor.
*/ */
public InstructionAdapter(final MethodVisitor methodVisitor) { public InstructionAdapter(final MethodVisitor methodVisitor) {
this(Opcodes.ASM6, methodVisitor); this(Opcodes.ASM7, methodVisitor);
if (getClass() != InstructionAdapter.class) { if (getClass() != InstructionAdapter.class) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
...@@ -63,8 +63,7 @@ public class InstructionAdapter extends MethodVisitor { ...@@ -63,8 +63,7 @@ public class InstructionAdapter extends MethodVisitor {
* Constructs a new {@link InstructionAdapter}. * Constructs a new {@link InstructionAdapter}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @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#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM7_EXPERIMENTAL}.
* @param methodVisitor the method visitor to which this adapter delegates calls. * @param methodVisitor the method visitor to which this adapter delegates calls.
*/ */
protected InstructionAdapter(final int api, final MethodVisitor methodVisitor) { protected InstructionAdapter(final int api, final MethodVisitor methodVisitor) {
...@@ -640,7 +639,7 @@ public class InstructionAdapter extends MethodVisitor { ...@@ -640,7 +639,7 @@ public class InstructionAdapter extends MethodVisitor {
|| (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) { || (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
if (api != Opcodes.ASM7_EXPERIMENTAL && value instanceof ConstantDynamic) { if (api != Opcodes.ASM7 && value instanceof ConstantDynamic) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
if (value instanceof Integer) { if (value instanceof Integer) {
......
...@@ -97,7 +97,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes { ...@@ -97,7 +97,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
final String descriptor, final String descriptor,
final String signature, final String signature,
final String[] exceptions) { 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) { if (getClass() != JSRInlinerAdapter.class) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
...@@ -107,8 +107,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes { ...@@ -107,8 +107,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
* Constructs a new {@link JSRInlinerAdapter}. * Constructs a new {@link JSRInlinerAdapter}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @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#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM7_EXPERIMENTAL}.
* @param methodVisitor the method visitor to send the resulting inlined method code to, or <code> * @param methodVisitor the method visitor to send the resulting inlined method code to, or <code>
* null</code>. * null</code>.
* @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if * @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if
......
...@@ -81,7 +81,7 @@ public class LocalVariablesSorter extends MethodVisitor { ...@@ -81,7 +81,7 @@ public class LocalVariablesSorter extends MethodVisitor {
*/ */
public LocalVariablesSorter( public LocalVariablesSorter(
final int access, final String descriptor, final MethodVisitor methodVisitor) { 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) { if (getClass() != LocalVariablesSorter.class) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
...@@ -91,8 +91,7 @@ public class LocalVariablesSorter extends MethodVisitor { ...@@ -91,8 +91,7 @@ public class LocalVariablesSorter extends MethodVisitor {
* Constructs a new {@link LocalVariablesSorter}. * Constructs a new {@link LocalVariablesSorter}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @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#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM7_EXPERIMENTAL}.
* @param access access flags of the adapted method. * @param access access flags of the adapted method.
* @param descriptor the method's descriptor (see {@link Type}). * @param descriptor the method's descriptor (see {@link Type}).
* @param methodVisitor the method visitor to which this adapter delegates calls. * @param methodVisitor the method visitor to which this adapter delegates calls.
......
...@@ -53,7 +53,7 @@ public class MethodRemapper extends MethodVisitor { ...@@ -53,7 +53,7 @@ public class MethodRemapper extends MethodVisitor {
* @param remapper the remapper to use to remap the types in the visited method. * @param remapper the remapper to use to remap the types in the visited method.
*/ */
public MethodRemapper(final MethodVisitor methodVisitor, final Remapper remapper) { public MethodRemapper(final MethodVisitor methodVisitor, final Remapper remapper) {
this(Opcodes.ASM6, methodVisitor, remapper); this(Opcodes.ASM7, methodVisitor, remapper);
} }
/** /**
......
...@@ -49,7 +49,7 @@ public class ModuleRemapper extends ModuleVisitor { ...@@ -49,7 +49,7 @@ public class ModuleRemapper extends ModuleVisitor {
* @param remapper the remapper to use to remap the types in the visited module. * @param remapper the remapper to use to remap the types in the visited module.
*/ */
public ModuleRemapper(final ModuleVisitor moduleVisitor, final Remapper remapper) { public ModuleRemapper(final ModuleVisitor moduleVisitor, final Remapper remapper) {
this(Opcodes.ASM6, moduleVisitor, remapper); this(Opcodes.ASM7, moduleVisitor, remapper);
} }
/** /**
......
...@@ -149,7 +149,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { ...@@ -149,7 +149,7 @@ public class SerialVersionUIDAdder extends ClassVisitor {
* @throws IllegalStateException If a subclass calls this constructor. * @throws IllegalStateException If a subclass calls this constructor.
*/ */
public SerialVersionUIDAdder(final ClassVisitor classVisitor) { public SerialVersionUIDAdder(final ClassVisitor classVisitor) {
this(Opcodes.ASM6, classVisitor); this(Opcodes.ASM7, classVisitor);
if (getClass() != SerialVersionUIDAdder.class) { if (getClass() != SerialVersionUIDAdder.class) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
...@@ -159,8 +159,7 @@ public class SerialVersionUIDAdder extends ClassVisitor { ...@@ -159,8 +159,7 @@ public class SerialVersionUIDAdder extends ClassVisitor {
* Constructs a new {@link SerialVersionUIDAdder}. * Constructs a new {@link SerialVersionUIDAdder}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @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#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* Opcodes#ASM7_EXPERIMENTAL}.
* @param classVisitor a {@link ClassVisitor} to which this visitor will delegate calls. * @param classVisitor a {@link ClassVisitor} to which this visitor will delegate calls.
*/ */
protected SerialVersionUIDAdder(final int api, final ClassVisitor classVisitor) { protected SerialVersionUIDAdder(final int api, final ClassVisitor classVisitor) {
......
...@@ -53,7 +53,7 @@ public class SignatureRemapper extends SignatureVisitor { ...@@ -53,7 +53,7 @@ public class SignatureRemapper extends SignatureVisitor {
* @param remapper the remapper to use to remap the types in the visited signature. * @param remapper the remapper to use to remap the types in the visited signature.
*/ */
public SignatureRemapper(final SignatureVisitor signatureVisitor, final Remapper remapper) { public SignatureRemapper(final SignatureVisitor signatureVisitor, final Remapper remapper) {
this(Opcodes.ASM6, signatureVisitor, remapper); this(Opcodes.ASM7, signatureVisitor, remapper);
} }
/** /**
......
...@@ -61,7 +61,7 @@ public class StaticInitMerger extends ClassVisitor { ...@@ -61,7 +61,7 @@ public class StaticInitMerger extends ClassVisitor {
* null. * null.
*/ */
public StaticInitMerger(final String prefix, final ClassVisitor classVisitor) { public StaticInitMerger(final String prefix, final ClassVisitor classVisitor) {
this(Opcodes.ASM6, prefix, classVisitor); this(Opcodes.ASM7, prefix, classVisitor);
} }
/** /**
......
...@@ -56,7 +56,7 @@ public class TryCatchBlockSorter extends MethodNode { ...@@ -56,7 +56,7 @@ public class TryCatchBlockSorter extends MethodNode {
final String descriptor, final String descriptor,
final String signature, final String signature,
final String[] exceptions) { 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) { if (getClass() != TryCatchBlockSorter.class) {
throw new IllegalStateException(); throw new IllegalStateException();
} }
......
...@@ -395,7 +395,7 @@ public class AdviceAdapterTest extends AsmTest { ...@@ -395,7 +395,7 @@ public class AdviceAdapterTest extends AsmTest {
methodGenerator = methodGenerator =
new MethodGenerator( new MethodGenerator(
new AdviceAdapter( new AdviceAdapter(
Opcodes.ASM6, methodVisitor, Opcodes.ACC_PUBLIC, "<init>", descriptor) { Opcodes.ASM7, methodVisitor, Opcodes.ACC_PUBLIC, "<init>", descriptor) {
@Override @Override
protected void onMethodEnter() { protected void onMethodEnter() {
...@@ -423,7 +423,7 @@ public class AdviceAdapterTest extends AsmTest { ...@@ -423,7 +423,7 @@ public class AdviceAdapterTest extends AsmTest {
private final boolean expectedClass; private final boolean expectedClass;
MethodGenerator(final MethodVisitor methodVisitor, final boolean expectedClass) { MethodGenerator(final MethodVisitor methodVisitor, final boolean expectedClass) {
super(Opcodes.ASM6, methodVisitor); super(Opcodes.ASM7, methodVisitor);
this.expectedClass = expectedClass; this.expectedClass = expectedClass;
} }
......
...@@ -150,7 +150,7 @@ public class AnalyzerAdapterTest extends AsmTest { ...@@ -150,7 +150,7 @@ public class AnalyzerAdapterTest extends AsmTest {
private boolean hasOriginalFrame; private boolean hasOriginalFrame;
AnalyzedFramesInserter(final MethodVisitor methodVisitor) { AnalyzedFramesInserter(final MethodVisitor methodVisitor) {
super(Opcodes.ASM7_EXPERIMENTAL, methodVisitor); super(Opcodes.ASM7, methodVisitor);
} }
void setAnalyzerAdapter(final AnalyzerAdapter analyzerAdapter) { void setAnalyzerAdapter(final AnalyzerAdapter analyzerAdapter) {
......
...@@ -811,11 +811,7 @@ public class GeneratorAdapterTest { ...@@ -811,11 +811,7 @@ public class GeneratorAdapterTest {
textifier = new Textifier(); textifier = new Textifier();
generatorAdapter = generatorAdapter =
new GeneratorAdapter( new GeneratorAdapter(
Opcodes.ASM7_EXPERIMENTAL, Opcodes.ASM7, new TraceMethodVisitor(textifier), access, name, descriptor);
new TraceMethodVisitor(textifier),
access,
name,
descriptor);
} }
public String push(final boolean value) { public String push(final boolean value) {
......
...@@ -140,7 +140,7 @@ public class LocalVariablesSorterTest extends AsmTest { ...@@ -140,7 +140,7 @@ public class LocalVariablesSorterTest extends AsmTest {
new ClassReader(new FileInputStream("src/test/resources/Issue317586.class")); new ClassReader(new FileInputStream("src/test/resources/Issue317586.class"));
ClassWriter classWriter = new ClassWriter(0); ClassWriter classWriter = new ClassWriter(0);
ClassVisitor classVisitor = ClassVisitor classVisitor =
new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL, classWriter) { new ClassVisitor(Opcodes.ASM7, classWriter) {
@Override @Override
public MethodVisitor visitMethod( public MethodVisitor visitMethod(
final int access, final int access,
......
...@@ -60,7 +60,7 @@ public class ModuleHashesAttributeTest { ...@@ -60,7 +60,7 @@ public class ModuleHashesAttributeTest {
ModuleHashesAttribute moduleHashesAttribute = new ModuleHashesAttribute(); ModuleHashesAttribute moduleHashesAttribute = new ModuleHashesAttribute();
new ClassReader(classWriter.toByteArray()) new ClassReader(classWriter.toByteArray())
.accept( .accept(
new ClassVisitor(Opcodes.ASM6) { new ClassVisitor(Opcodes.ASM7) {
@Override @Override
public void visitAttribute(final Attribute attribute) { public void visitAttribute(final Attribute attribute) {
......
...@@ -51,7 +51,7 @@ public class ModuleResolutionAttributeTest { ...@@ -51,7 +51,7 @@ public class ModuleResolutionAttributeTest {
ModuleResolutionAttribute moduleResolutionAttribute = new ModuleResolutionAttribute(); ModuleResolutionAttribute moduleResolutionAttribute = new ModuleResolutionAttribute();
new ClassReader(classWriter.toByteArray()) new ClassReader(classWriter.toByteArray())
.accept( .accept(
new ClassVisitor(Opcodes.ASM6) { new ClassVisitor(Opcodes.ASM7) {
@Override @Override
public void visitAttribute(final Attribute attribute) { public void visitAttribute(final Attribute attribute) {
......
...@@ -51,7 +51,7 @@ public class ModuleTargetAttributeTest { ...@@ -51,7 +51,7 @@ public class ModuleTargetAttributeTest {
ModuleTargetAttribute moduleTargetAttribute = new ModuleTargetAttribute(); ModuleTargetAttribute moduleTargetAttribute = new ModuleTargetAttribute();
new ClassReader(classWriter.toByteArray()) new ClassReader(classWriter.toByteArray())
.accept( .accept(
new ClassVisitor(Opcodes.ASM6) { new ClassVisitor(Opcodes.ASM7) {
@Override @Override
public void visitAttribute(final Attribute attribute) { public void visitAttribute(final Attribute attribute) {
......
...@@ -51,7 +51,7 @@ public class SerialVersionUIDAdderTest extends AsmTest { ...@@ -51,7 +51,7 @@ public class SerialVersionUIDAdderTest extends AsmTest {
long[] svuid = new long[1]; long[] svuid = new long[1];
new ClassReader(className) new ClassReader(className)
.accept( .accept(
new SerialVersionUIDAdder(Opcodes.ASM6, null) { new SerialVersionUIDAdder(Opcodes.ASM7, null) {
@Override @Override
protected long computeSVUID() throws IOException { protected long computeSVUID() throws IOException {
svuid[0] = super.computeSVUID(); svuid[0] = super.computeSVUID();
...@@ -109,7 +109,7 @@ public class SerialVersionUIDAdderTest extends AsmTest { ...@@ -109,7 +109,7 @@ public class SerialVersionUIDAdderTest extends AsmTest {
final PrecompiledClass classParameter, final Api apiParameter) { final PrecompiledClass classParameter, final Api apiParameter) {
ClassReader classReader = new ClassReader(classParameter.getBytes()); ClassReader classReader = new ClassReader(classParameter.getBytes());
ClassWriter classWriter = new ClassWriter(0); 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) { if ((classReader.getAccess() & Opcodes.ACC_ENUM) == 0) {
assertThatClass(classWriter.toByteArray()).contains("serialVersionUID"); assertThatClass(classWriter.toByteArray()).contains("serialVersionUID");