Commit 6a90edb0 authored by Eric Bruneton's avatar Eric Bruneton

Improve the code quality of the commons package tests.

parent 3224adf0
......@@ -348,7 +348,7 @@ public class AdviceAdapterTest extends AsmTest {
methodGenerator.visitJumpInsn(Opcodes.GOTO, label1);
Label label2 = new Label();
methodGenerator.visitLabel(label2);
methodGenerator.visitInsn(Opcodes.POP);
methodGenerator.visitInsn(Opcodes.POP);
methodGenerator.expectMethodExit();
methodGenerator.visitInsn(Opcodes.RETURN);
methodGenerator.visitLabel(label1);
......@@ -363,7 +363,7 @@ public class AdviceAdapterTest extends AsmTest {
new Consumer<MethodGenerator>() {
@Override
public void accept(MethodGenerator methodGenerator) {
public void accept(final MethodGenerator methodGenerator) {
methodGenerator.visitInsn(Opcodes.IRETURN);
}
};
......@@ -372,7 +372,7 @@ public class AdviceAdapterTest extends AsmTest {
() -> generateClass(constructorGenerator, /* expectedClass= */ false));
}
private static void testCase(Consumer<MethodGenerator> testCaseGenerator) {
private static void testCase(final Consumer<MethodGenerator> testCaseGenerator) {
byte[] actualClass = generateClass(testCaseGenerator, /* expectedClass= */ false);
byte[] expectedClass = generateClass(testCaseGenerator, /* expectedClass= */ true);
assertThatClass(actualClass).isEqualTo(expectedClass);
......@@ -380,7 +380,7 @@ public class AdviceAdapterTest extends AsmTest {
}
private static byte[] generateClass(
Consumer<MethodGenerator> constructorGenerator, boolean expectedClass) {
final Consumer<MethodGenerator> constructorGenerator, final boolean expectedClass) {
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_MAXS);
classWriter.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC, "C", null, "java/lang/Object", null);
......@@ -404,7 +404,7 @@ public class AdviceAdapterTest extends AsmTest {
}
@Override
protected void onMethodExit(int opcode) {
protected void onMethodExit(final int opcode) {
generateAdvice(this, /* enter= */ false);
}
},
......@@ -449,13 +449,13 @@ public class AdviceAdapterTest extends AsmTest {
Opcodes.INVOKEVIRTUAL,
"java/io/PrintStream",
"println",
"(Ljava/lang/String;)V", /* isInterface= */
false);
"(Ljava/lang/String;)V",
/* isInterface= */ false);
}
@ParameterizedTest
@MethodSource(ALL_CLASSES_AND_ALL_APIS)
public void testEmptyAdviceAdapter(PrecompiledClass classParameter, Api apiParameter)
public void testEmptyAdviceAdapter(final PrecompiledClass classParameter, final Api apiParameter)
throws Exception {
ClassReader classReader = new ClassReader(classParameter.getBytes());
ClassWriter expectedClassWriter = new ClassWriter(0);
......
......@@ -78,8 +78,8 @@ public class AnalyzerAdapterTest extends AsmTest {
*/
@ParameterizedTest
@MethodSource(ALL_CLASSES_AND_ALL_APIS)
public void testAnalyzeLoadAndInstantiate(PrecompiledClass classParameter, Api apiParameter)
throws Exception {
public void testAnalyzeLoadAndInstantiate(
final PrecompiledClass classParameter, final Api apiParameter) throws Exception {
byte[] classFile = classParameter.getBytes();
ClassReader classReader = new ClassReader(classFile);
ClassWriter classWriter = new ClassWriter(0);
......@@ -104,22 +104,22 @@ public class AnalyzerAdapterTest extends AsmTest {
public MethodVisitor visitMethod(
final int access,
final String name,
final String desc,
final String descriptor,
final String signature,
final String[] exceptions) {
MethodVisitor methodVisitor =
super.visitMethod(access, name, desc, signature, exceptions);
super.visitMethod(access, name, descriptor, signature, exceptions);
AnalyzedFramesInserter inserter = new AnalyzedFramesInserter(methodVisitor);
AnalyzerAdapter analyzerAdapter =
new AnalyzerAdapter(api, owner, access, name, desc, inserter) {
new AnalyzerAdapter(api, owner, access, name, descriptor, inserter) {
@Override
public void visitMaxs(int maxStack, int maxLocals) {
public void visitMaxs(final int maxStack, final int maxLocals) {
// AnalyzerAdapter should correctly recompute maxLocals from scratch.
super.visitMaxs(maxStack, 0);
}
};
inserter.analyzer = analyzerAdapter;
inserter.setAnalyzerAdapter(analyzerAdapter);
return analyzerAdapter;
}
};
......@@ -147,15 +147,24 @@ public class AnalyzerAdapterTest extends AsmTest {
*/
static class AnalyzedFramesInserter extends MethodVisitor {
AnalyzerAdapter analyzer;
private AnalyzerAdapter analyzerAdapter;
private boolean hasOriginalFrame;
public AnalyzedFramesInserter(MethodVisitor mv) {
super(Opcodes.ASM6, mv);
AnalyzedFramesInserter(final MethodVisitor methodVisitor) {
super(Opcodes.ASM6, methodVisitor);
}
void setAnalyzerAdapter(final AnalyzerAdapter analyzerAdapter) {
this.analyzerAdapter = analyzerAdapter;
}
@Override
public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
public void visitFrame(
final int type,
final int nLocal,
final Object[] local,
final int nStack,
final Object[] stack) {
super.visitFrame(type, nLocal, local, nStack, stack);
hasOriginalFrame = true;
}
......@@ -163,9 +172,9 @@ public class AnalyzerAdapterTest extends AsmTest {
private void maybeInsertFrame() {
// Don't insert a frame if we already have one for this instruction, from the original class.
if (!hasOriginalFrame) {
if (analyzer.locals != null && analyzer.stack != null) {
ArrayList<Object> local = toFrameTypes(analyzer.locals);
ArrayList<Object> stack = toFrameTypes(analyzer.stack);
if (analyzerAdapter.locals != null && analyzerAdapter.stack != null) {
ArrayList<Object> local = toFrameTypes(analyzerAdapter.locals);
ArrayList<Object> stack = toFrameTypes(analyzerAdapter.stack);
super.visitFrame(
Opcodes.F_NEW, local.size(), local.toArray(), stack.size(), stack.toArray());
}
......@@ -177,7 +186,7 @@ public class AnalyzerAdapterTest extends AsmTest {
* Converts local and stack types from AnalyzerAdapter to visitFrame format (long and double are
* represented with one element in visitFrame, but with two elements in AnalyzerAdapter).
*/
private ArrayList<Object> toFrameTypes(List<Object> analyzerTypes) {
private ArrayList<Object> toFrameTypes(final List<Object> analyzerTypes) {
ArrayList<Object> frameTypes = new ArrayList<Object>();
for (int i = 0; i < analyzerTypes.size(); ++i) {
Object value = analyzerTypes.get(i);
......@@ -190,81 +199,93 @@ public class AnalyzerAdapterTest extends AsmTest {
}
@Override
public void visitInsn(int opcode) {
public void visitInsn(final int opcode) {
maybeInsertFrame();
super.visitInsn(opcode);
}
@Override
public void visitIntInsn(int opcode, int operand) {
public void visitIntInsn(final int opcode, final int operand) {
maybeInsertFrame();
super.visitIntInsn(opcode, operand);
}
@Override
public void visitVarInsn(int opcode, int var) {
public void visitVarInsn(final int opcode, final int var) {
maybeInsertFrame();
super.visitVarInsn(opcode, var);
}
@Override
public void visitTypeInsn(int opcode, String type) {
public void visitTypeInsn(final int opcode, final String type) {
maybeInsertFrame();
super.visitTypeInsn(opcode, type);
}
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
public void visitFieldInsn(
final int opcode, final String owner, final String name, final String descriptor) {
maybeInsertFrame();
super.visitFieldInsn(opcode, owner, name, desc);
super.visitFieldInsn(opcode, owner, name, descriptor);
}
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
public void visitMethodInsn(
final int opcode,
final String owner,
final String name,
final String descriptor,
final boolean isInterface) {
maybeInsertFrame();
super.visitMethodInsn(opcode, owner, name, desc, itf);
super.visitMethodInsn(opcode, owner, name, descriptor, isInterface);
}
@Override
public void visitInvokeDynamicInsn(String name, String desc, Handle bsm, Object... bsmArgs) {
public void visitInvokeDynamicInsn(
final String name,
final String descriptor,
final Handle bootstrapMethodHandle,
final Object... bootstrapMethodArguments) {
maybeInsertFrame();
super.visitInvokeDynamicInsn(name, desc, bsm, bsmArgs);
super.visitInvokeDynamicInsn(
name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments);
}
@Override
public void visitJumpInsn(int opcode, Label label) {
public void visitJumpInsn(final int opcode, final Label label) {
maybeInsertFrame();
super.visitJumpInsn(opcode, label);
}
@Override
public void visitLdcInsn(Object cst) {
public void visitLdcInsn(final Object value) {
maybeInsertFrame();
super.visitLdcInsn(cst);
super.visitLdcInsn(value);
}
@Override
public void visitIincInsn(int var, int increment) {
public void visitIincInsn(final int var, final int increment) {
maybeInsertFrame();
super.visitIincInsn(var, increment);
}
@Override
public void visitTableSwitchInsn(int min, int max, Label dflt, Label... labels) {
public void visitTableSwitchInsn(
final int min, final int max, final Label dflt, final Label... labels) {
maybeInsertFrame();
super.visitTableSwitchInsn(min, max, dflt, labels);
}
@Override
public void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) {
public void visitLookupSwitchInsn(final Label dflt, final int[] keys, final Label[] labels) {
maybeInsertFrame();
super.visitLookupSwitchInsn(dflt, keys, labels);
}
@Override
public void visitMultiANewArrayInsn(String desc, int dims) {
public void visitMultiANewArrayInsn(final String descriptor, final int numDimensions) {
maybeInsertFrame();
super.visitMultiANewArrayInsn(desc, dims);
super.visitMultiANewArrayInsn(descriptor, numDimensions);
}
}
}
......@@ -31,222 +31,30 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.objectweb.asm.test.Assertions.assertThat;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.ListIterator;
import java.util.Map;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.test.AsmTest;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldInsnNode;
import org.objectweb.asm.tree.FieldNode;
import org.objectweb.asm.tree.FrameNode;
import org.objectweb.asm.tree.InnerClassNode;
import org.objectweb.asm.tree.LdcInsnNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.MultiANewArrayInsnNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import org.objectweb.asm.tree.TypeInsnNode;
import org.objectweb.asm.util.CheckMethodAdapter;
public class ClassRemapperTest extends AsmTest implements Opcodes {
/**
* ClassRemapper tests.
*
* @author Eric Bruneton
*/
public class ClassRemapperTest extends AsmTest {
@Test
public void testClassRemapper() throws Exception {
Map<String, String> map = new HashMap<String, String>();
map.put("Boo", "B1");
map.put("Coo", "C1");
map.put("Doo", "D1");
Remapper remapper = new SimpleRemapper(map);
ClassNode cn = new ClassNode();
dump(new ClassRemapper(cn, remapper));
assertEquals("D1", cn.name);
assertEquals("B1", cn.superName);
assertEquals(Arrays.asList(new String[] {"I", "I", "C1", "J", "B1"}), cn.interfaces);
assertEquals("LB1;", field(cn, 0).desc);
assertEquals("[LB1;", field(cn, 1).desc);
assertEquals("D1", innerClass(cn, 0).name);
assertEquals("B1", innerClass(cn, 0).outerName);
// assertEquals("Doo", innerClass(cn, 0).innerName);
assertEquals("B1", cn.outerClass);
assertEquals("([[LB1;LC1;LD1;)LC1;", cn.outerMethodDesc);
MethodNode mn0 = cn.methods.get(0);
ListIterator<AbstractInsnNode> it = mn0.instructions.iterator();
FieldInsnNode n0 = (FieldInsnNode) it.next();
assertEquals("D1", n0.owner);
assertEquals("LB1;", n0.desc);
assertEquals(Type.getType("LB1;"), ((LdcInsnNode) it.next()).cst);
assertEquals(Type.getType("[LD1;"), ((LdcInsnNode) it.next()).cst);
assertEquals(Type.getType("[I"), ((LdcInsnNode) it.next()).cst);
assertEquals(Type.getType("J"), ((LdcInsnNode) it.next()).cst);
assertEquals("B1", ((TypeInsnNode) it.next()).desc);
assertEquals("[LD1;", ((TypeInsnNode) it.next()).desc);
assertEquals("[I", ((TypeInsnNode) it.next()).desc);
assertEquals("J", ((TypeInsnNode) it.next()).desc);
MultiANewArrayInsnNode n3 = (MultiANewArrayInsnNode) it.next();
assertEquals("[[LB1;", n3.desc);
MethodInsnNode n4 = (MethodInsnNode) it.next();
assertEquals("D1", n4.owner);
assertEquals("([[LB1;LC1;LD1;)LC1;", n4.desc);
FrameNode fn0 = (FrameNode) it.next();
assertEquals(Collections.EMPTY_LIST, fn0.local);
assertEquals(Collections.EMPTY_LIST, fn0.stack);
assertEquals(Arrays.asList(new Object[] {"B1", "C1", "D1"}), ((FrameNode) it.next()).local);
assertEquals(
Arrays.asList(new Object[] {Opcodes.INTEGER, "C1", Opcodes.INTEGER, "D1"}),
((FrameNode) it.next()).local);
assertEquals(
Arrays.asList(new Object[] {Opcodes.INTEGER, Opcodes.INTEGER}),
((FrameNode) it.next()).local);
// assertEquals(Collections.EMPTY_LIST, fn0.stack);
TryCatchBlockNode tryCatchBlockNode = mn0.tryCatchBlocks.get(0);
assertEquals("C1", tryCatchBlockNode.type);
MethodNode mn1 = cn.methods.get(1);
assertEquals("([[LB1;LC1;LD1;)V", mn1.desc);
assertEquals(Arrays.asList(new String[] {"I", "J"}), mn1.exceptions);
}
private FieldNode field(ClassNode cn, int n) {
return cn.fields.get(n);
}
private InnerClassNode innerClass(ClassNode cn, int n) {
return cn.innerClasses.get(n);
}
public static void dump(ClassVisitor cv) throws Exception {
cv.visit(V1_5, 0, "Doo", null, "Boo", new String[] {"I", "I", "Coo", "J", "Boo"});
cv.visitInnerClass("Doo", "Boo", "Doo", 0);
cv.visitOuterClass("Boo", "foo", "([[LBoo;LCoo;LDoo;)LCoo;");
cv.visitField(0, "boo", "LBoo;", null, null).visitEnd();
cv.visitField(0, "boo1", "[LBoo;", null, null).visitEnd();
cv.visitField(0, "s", "Ljava/lang/String;", null, null).visitEnd();
cv.visitField(0, "i", "I", null, null).visitEnd();
MethodVisitor mv;
mv = cv.visitMethod(0, "foo", "()V", null, null);
mv.visitCode();
mv.visitFieldInsn(GETFIELD, "Doo", "boo", "LBoo;");
mv.visitLdcInsn(Type.getType("LBoo;"));
mv.visitLdcInsn(Type.getType("[LDoo;"));
mv.visitLdcInsn(Type.getType("[I"));
mv.visitLdcInsn(Type.getType("J"));
mv.visitTypeInsn(ANEWARRAY, "Boo");
mv.visitTypeInsn(ANEWARRAY, "[LDoo;");
mv.visitTypeInsn(ANEWARRAY, "[I");
mv.visitTypeInsn(ANEWARRAY, "J");
mv.visitMultiANewArrayInsn("[[LBoo;", 2);
mv.visitMethodInsn(INVOKEVIRTUAL, "Doo", "goo", "([[LBoo;LCoo;LDoo;)LCoo;", false);
mv.visitFrame(Opcodes.F_NEW, 0, new Object[5], 0, new Object[10]);
mv.visitFrame(Opcodes.F_NEW, 3, new Object[] {"Boo", "Coo", "Doo"}, 0, new Object[0]);
mv.visitFrame(
Opcodes.F_NEW,
4,
new Object[] {Opcodes.INTEGER, "Coo", Opcodes.INTEGER, "Doo"},
0,
new Object[0]);
mv.visitFrame(
Opcodes.F_NEW, 2, new Object[] {Opcodes.INTEGER, Opcodes.INTEGER}, 0, new Object[0]);
Label l = new Label();
mv.visitLocalVariable("boo", "LBoo;", null, l, l, 1);
mv.visitLocalVariable("boo1", "[LBoo;", null, l, l, 3);
mv.visitLocalVariable("boo2", "[[LBoo;", null, l, l, 4);
mv.visitMaxs(0, 0);
mv.visitTryCatchBlock(l, l, l, "Coo");
mv.visitEnd();
mv = cv.visitMethod(0, "goo", "([[LBoo;LCoo;LDoo;)V", null, new String[] {"I", "J"});
mv.visitEnd();
cv.visitEnd();
}
// /*
public static class Boo {}
public static interface Coo {}
public static class Doo extends Boo implements Coo {
Boo boo = new Boo();
Boo[] boo1 = new Boo[2];
String s = "";
int i = 5;
static final Class<?> c1 = Boo.class;
static final Class<?> c2 = Boo[].class;
public Doo() {}
public Doo(int i, Coo coo, Boo boo) {}
void foo() {
class Eoo {
String s;
}
Eoo e = new Eoo();
e.s = "aaa";
// visitFieldInsn(int, String, String, String)
// visitLocalVariable(String, String, String, Label, Label, int)
Boo boo = this.boo;
// visitLdcInsn(Object)
Class<?> cc = Boo.class;
// visitTypeInsn(int, String)
Boo[] boo1 = new Boo[2];
// visitMultiANewArrayInsn(String, int)
Boo[][] boo2 = new Boo[2][2];
// visitMethodInsn(int, String, String, String)
goo(boo2, this, this);
}
Coo goo(Boo[][] boo2, Coo coo, Doo doo) {
return null;
}
public void testRenameClass() {
ClassNode classNode = new ClassNode();
ClassRemapper classRemapper =
new ClassRemapper(classNode, new SimpleRemapper("pkg/C", "new/pkg/C"));
classRemapper.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC, "pkg/C", null, "java/lang/Object", null);
assertEquals("new/pkg/C", classNode.name);
}
/** Tests that classes transformed with a ClassRemapper can be loaded and instantiated. */
......@@ -302,7 +110,7 @@ public class ClassRemapperTest extends AsmTest implements Opcodes {
private final String internalClassName;
private final String remappedInternalClassName;
public UpperCaseRemapper(final String internalClassName) {
UpperCaseRemapper(final String internalClassName) {
this.internalClassName = internalClassName;
this.remappedInternalClassName =
internalClassName.equals("module-info")
......
......@@ -56,11 +56,11 @@ public class CodeComment extends Attribute {
@Override
protected Attribute read(
final ClassReader cr,
final int off,
final int len,
final char[] buf,
final int codeOff,
final ClassReader classReader,
final int offset,
final int length,
final char[] charBuffer,
final int codeOffset,
final Label[] labels) {
return new CodeComment();
......@@ -68,9 +68,9 @@ public class CodeComment extends Attribute {
@Override
protected ByteVector write(
final ClassWriter cw,
final ClassWriter classWriter,
final byte[] code,
final int len,
final int codeLength,
final int maxStack,
final int maxLocals) {
return new ByteVector();
......
......@@ -53,7 +53,7 @@ public class CodeSizeEvaluatorTest extends AsmTest {
*/
@ParameterizedTest
@MethodSource(ALL_CLASSES_AND_ALL_APIS)
public void testSizeEvaluation(PrecompiledClass classParameter, Api apiParameter) {
public void testSizeEvaluation(final PrecompiledClass classParameter, final Api apiParameter) {
byte[] classFile = classParameter.getBytes();
ClassReader classReader = new ClassReader(classFile);
ClassWriter classWriter = new ClassWriter(0);
......@@ -63,16 +63,17 @@ public class CodeSizeEvaluatorTest extends AsmTest {
public MethodVisitor visitMethod(
final int access,
final String name,
final String desc,
final String descriptor,
final String signature,
final String[] exceptions) {
MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions);
return new CodeSizeEvaluator(api, mv) {
MethodVisitor methodVisitor =
super.visitMethod(access, name, descriptor, signature, exceptions);
return new CodeSizeEvaluator(api, methodVisitor) {
@Override
public void visitMaxs(final int maxStack, final int maxLocals) {
Label end = new Label();
mv.visitLabel(end);
mv.visitMaxs(maxStack, maxLocals);
visitLabel(end);
super.visitMaxs(maxStack, maxLocals);
int actualSize = end.getOffset();
assertTrue(getMinSize() <= actualSize);
assertTrue(actualSize <= getMaxSize());
......
......@@ -51,21 +51,20 @@ public class Comment extends Attribute {
@Override
protected Attribute read(
final ClassReader cr,
final int off,
final int len,
final char[] buf,
final int codeOff,
final ClassReader classReader,
final int offset,
final int length,
final char[] charBuffer,
final int codeOffset,
final Label[] labels) {
return new Comment();
}
@Override
protected ByteVector write(
final ClassWriter cw,
final ClassWriter classWriter,
final byte[] code,
final int len,
final int codeLength,
final int maxStack,
final int maxLocals) {
return new ByteVector();
......
......@@ -799,11 +799,11 @@ public class GeneratorAdapterTest {
private final Textifier textifier;
private final GeneratorAdapter generatorAdapter;
public Generator() {
Generator() {
this(Opcodes.ACC_PUBLIC, "m", "()V");
}
public Generator(final int access, final String name, final String descriptor) {
Generator(final int access, final String name, final String descriptor) {
textifier = new Textifier();
generatorAdapter =
new GeneratorAdapter(
......@@ -1058,7 +1058,7 @@ public class GeneratorAdapterTest {
}
@Override
public void generateCase(int key, Label end) {
public void generateCase(final int key, final Label end) {
generatorAdapter.push(key);
}
......@@ -1113,8 +1113,12 @@ public class GeneratorAdapterTest {
}
public String invokeDynamic(
final String name, final String desc, final Handle bsm, final Object... bsmArgs) {
generatorAdapter.invokeDynamic(name, desc, bsm, bsmArgs);
final String name,
final String descriptor,
final Handle bootstrapMethodHandle,
final Object... bootstrapMethodArguments) {
generatorAdapter.invokeDynamic(
name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments);
return toString();
}
......
......@@ -102,7 +102,7 @@ public class LocalVariablesSorterTest extends AsmTest {
@ParameterizedTest
@MethodSource(ALL_CLASSES_AND_ALL_APIS)
public void testSortLocalVariablesAndInstantiate(
PrecompiledClass classParameter, Api apiParameter) {
final PrecompiledClass classParameter, final Api apiParameter) {
ClassReader classReader = new ClassReader(classParameter.getBytes());
ClassWriter classWriter = new ClassWriter(0);
ClassVisitor classVisitor =
......@@ -111,11 +111,14 @@ public class LocalVariablesSorterTest extends AsmTest {
public MethodVisitor visitMethod(
final int access,
final String name,
final String desc,
final String descriptor,
final String signature,
final String[] exceptions) {
return new LocalVariablesSorter(
api, access, desc, super.visitMethod(access, name, desc, signature, exceptions));
api,
access,
descriptor,
super.visitMethod(access, name, descriptor, signature, exceptions));
}
};
......@@ -143,11 +146,14 @@ public class LocalVariablesSorterTest extends AsmTest {
public MethodVisitor visitMethod(
final int access,