8332505: JEP 457: ClassRemapper forgets to remap bootstrap method references

Reviewed-by: jlahoda
This commit is contained in:
Adam Sotona 2024-05-28 12:29:30 +00:00
parent cabe337400
commit aa4c83a5bf
2 changed files with 9 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -239,7 +239,7 @@ public record ClassRemapperImpl(Function<ClassDesc, ClassDesc> mapFunction) impl
ii.isInterface());
case InvokeDynamicInstruction idi ->
cob.invokedynamic(DynamicCallSiteDesc.of(
idi.bootstrapMethod(), idi.name().stringValue(),
mapDirectMethodHandle(idi.bootstrapMethod()), idi.name().stringValue(),
mapMethodDesc(idi.typeSymbol()),
idi.bootstrapArgs().stream().map(this::mapConstantValue).toArray(ConstantDesc[]::new)));
case NewObjectInstruction c ->