diff --git a/test/logger-usage/build.gradle b/test/logger-usage/build.gradle index 34bddf82eb5d8..dc8db713d5953 100644 --- a/test/logger-usage/build.gradle +++ b/test/logger-usage/build.gradle @@ -18,7 +18,9 @@ */ dependencies { - compile 'org.ow2.asm:asm-debug-all:5.0.4' // use asm-debug-all as asm-all is broken + compile 'org.ow2.asm:asm:7.1' + compile 'org.ow2.asm:asm-tree:7.1' + compile 'org.ow2.asm:asm-analysis:7.1' compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" testCompile project(":test:framework") } diff --git a/test/logger-usage/src/main/java/org/elasticsearch/test/loggerusage/ESLoggerUsageChecker.java b/test/logger-usage/src/main/java/org/elasticsearch/test/loggerusage/ESLoggerUsageChecker.java index 28b3e0bf94f03..63c3dd9a24d90 100644 --- a/test/logger-usage/src/main/java/org/elasticsearch/test/loggerusage/ESLoggerUsageChecker.java +++ b/test/logger-usage/src/main/java/org/elasticsearch/test/loggerusage/ESLoggerUsageChecker.java @@ -188,7 +188,7 @@ private static class ClassChecker extends ClassVisitor { private final Predicate methodsToCheck; ClassChecker(Consumer wrongUsageCallback, Predicate methodsToCheck) { - super(Opcodes.ASM5); + super(Opcodes.ASM7); this.wrongUsageCallback = wrongUsageCallback; this.methodsToCheck = methodsToCheck; } @@ -222,7 +222,7 @@ private static class MethodChecker extends MethodVisitor { private boolean ignoreChecks; MethodChecker(String className, int access, String name, String desc, Consumer wrongUsageCallback) { - super(Opcodes.ASM5, new MethodNode(access, name, desc, null, null)); + super(Opcodes.ASM7, new MethodNode(access, name, desc, null, null)); this.className = className; this.wrongUsageCallback = wrongUsageCallback; } @@ -503,6 +503,10 @@ private static final class IntegerConstantBasicValue extends IntMinMaxTrackingBa } private static final class PlaceHolderStringInterpreter extends BasicInterpreter { + PlaceHolderStringInterpreter() { + super(Opcodes.ASM7); + } + @Override public BasicValue newOperation(AbstractInsnNode insnNode) throws AnalyzerException { if (insnNode.getOpcode() == Opcodes.LDC) { @@ -527,6 +531,10 @@ public BasicValue merge(BasicValue value1, BasicValue value2) { } private static final class ArraySizeInterpreter extends BasicInterpreter { + ArraySizeInterpreter() { + super(Opcodes.ASM7); + } + @Override public BasicValue newOperation(AbstractInsnNode insnNode) throws AnalyzerException { switch (insnNode.getOpcode()) {