diff --git a/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java b/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java index 9c2badd6b652cf71f30d6e4bdd5536236e2331fb..cb6ab1926ee13bf787e1bb39e8313403ea110776 100644 --- a/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java +++ b/asm-commons/src/main/java/org/objectweb/asm/commons/MethodRemapper.java @@ -158,14 +158,15 @@ public class MethodRemapper extends MethodVisitor { @Override public void visitInvokeDynamicInsn(String name, String desc, Handle bsm, Object... bsmArgs) { + Object[] remappedBsmArgs = new Object[bsmArgs.length]; for (int i = 0; i < bsmArgs.length; i++) { - bsmArgs[i] = remapper.mapValue(bsmArgs[i]); + remappedBsmArgs[i] = remapper.mapValue(bsmArgs[i]); } super.visitInvokeDynamicInsn( remapper.mapInvokeDynamicMethodName(name, desc), remapper.mapMethodDesc(desc), (Handle) remapper.mapValue(bsm), - bsmArgs); + remappedBsmArgs); } @Override