8304148: Remapping a class with Invokedynamic constant loses static bootstrap arguments

Reviewed-by: asotona
This commit is contained in:
Thiago Henrique Hüpner 2023-05-09 17:33:27 +00:00 committed by Adam Sotona
parent 82bcee76ea
commit dde557e312
2 changed files with 3 additions and 1 deletions

View file

@ -317,7 +317,8 @@ public sealed interface ClassRemapper extends ClassTransform {
case InvokeDynamicInstruction idi ->
cob.invokeDynamicInstruction(DynamicCallSiteDesc.of(
idi.bootstrapMethod(), idi.name().stringValue(),
mapMethodDesc(idi.typeSymbol())));
mapMethodDesc(idi.typeSymbol()),
idi.bootstrapArgs().stream().map(this::mapConstantValue).toArray(ConstantDesc[]::new)));
case NewObjectInstruction c ->
cob.newObjectInstruction(map(c.className().asSymbol()));
case NewReferenceArrayInstruction c ->