]> source.dussan.org Git - aspectj.git/commitdiff
Adjust ASM version number used to work properly with Records (J14)
authorAndy Clement <aclement@pivotal.io>
Thu, 13 Aug 2020 20:40:06 +0000 (13:40 -0700)
committerAndy Clement <aclement@pivotal.io>
Thu, 13 Aug 2020 20:40:06 +0000 (13:40 -0700)
weaver/src/main/java/org/aspectj/weaver/bcel/asm/StackMapAdder.java

index 9ede3e99dfcb830572b2f1bd7b5661fc48204d6a..9be8f80de1e1868b2083ac3e9d0f9530ea986375 100644 (file)
@@ -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);
                        }
                }