From 4f027bd94fe71756894f13a4a82123eda4f28b98 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Thu, 13 Aug 2020 13:40:06 -0700 Subject: Adjust ASM version number used to work properly with Records (J14) --- weaver/src/main/java/org/aspectj/weaver/bcel/asm/StackMapAdder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'weaver') diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/asm/StackMapAdder.java b/weaver/src/main/java/org/aspectj/weaver/bcel/asm/StackMapAdder.java index 9ede3e99d..9be8f80de 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/asm/StackMapAdder.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/asm/StackMapAdder.java @@ -45,6 +45,7 @@ public class StackMapAdder { cr.accept(cv, 0); return cw.toByteArray(); } catch (Throwable t) { + // If in here fixing an error about version, change the ASMX in class above! System.err.println("AspectJ Internal Error: unable to add stackmap attributes. " + t.getMessage()); t.printStackTrace(); AsmDetector.isAsmAround = false; @@ -55,7 +56,7 @@ public class StackMapAdder { private static class AspectJClassVisitor extends ClassVisitor { public AspectJClassVisitor(ClassVisitor classwriter) { - super(Opcodes.ASM7, classwriter); + super(Opcodes.ASM8, classwriter); } @Override @@ -68,7 +69,7 @@ public class StackMapAdder { // created by a ClassWriter (see top level class comment) static class AJMethodVisitor extends MethodVisitor { public AJMethodVisitor(MethodVisitor mv) { - super(Opcodes.ASM7,mv); + super(Opcodes.ASM8,mv); } } -- cgit v1.2.3