]> source.dussan.org Git - aspectj.git/commitdiff
Fix ConstantDynamic to use the right tag.
authorAndy Clement <aclement@pivotal.io>
Fri, 7 Jan 2022 06:18:21 +0000 (22:18 -0800)
committerAndy Clement <aclement@pivotal.io>
Fri, 7 Jan 2022 06:18:21 +0000 (22:18 -0800)
The class ConstantDynamic was incorrectly using the `InvokeDynamic` tag
during construction which meant after reading in code containing a
`Dynamic` reference, it would incorrectly be written out as an
`InvokeDynamic` reference. There is not much code out there using
Dynamic so wasn't uncovered before.

Fixes #68

bcel-builder/src/main/java/org/aspectj/apache/bcel/classfile/ConstantDynamic.java

index ad9eb304951743764d401f862ce363d769f5b61d..fc240e6fe1915eb76d8bbeef60dff1de15a7265d 100644 (file)
@@ -78,7 +78,7 @@ public final class ConstantDynamic extends Constant {
        }
 
        public ConstantDynamic(int readUnsignedShort, int nameAndTypeIndex) {
-               super(Constants.CONSTANT_InvokeDynamic);
+               super(Constants.CONSTANT_Dynamic);
                this.bootstrapMethodAttrIndex = readUnsignedShort;
                this.nameAndTypeIndex = nameAndTypeIndex;
        }