-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
21
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Using the new internal Classfile API to rename a class that includes an Invokedynamic constant pool item, like LambdaMetafactory, does not copy the static bootstrap arguments.
The issue seems to be in the class jdk/internal/classfile/components/ClassRemapper.java
ClassRemapper is doing the following
case InvokeDynamicInstruction idi ->
cob.invokeDynamicInstruction(DynamicCallSiteDesc.of(
idi.bootstrapMethod(), idi.name().stringValue(),
mapMethodDesc(idi.typeSymbol())));
However, this way it ignores the bootstrap arguments. Probably it should be something like this:
case InvokeDynamicInstruction idi ->
cob.invokeDynamicInstruction(DynamicCallSiteDesc.of(
idi.bootstrapMethod(), idi.name().stringValue(),
mapMethodDesc(idi.typeSymbol()),
idi.bootstrapArgs().toArray(ConstantDesc[]::new));
FREQUENCY : always
Using the new internal Classfile API to rename a class that includes an Invokedynamic constant pool item, like LambdaMetafactory, does not copy the static bootstrap arguments.
The issue seems to be in the class jdk/internal/classfile/components/ClassRemapper.java
ClassRemapper is doing the following
case InvokeDynamicInstruction idi ->
cob.invokeDynamicInstruction(DynamicCallSiteDesc.of(
idi.bootstrapMethod(), idi.name().stringValue(),
mapMethodDesc(idi.typeSymbol())));
However, this way it ignores the bootstrap arguments. Probably it should be something like this:
case InvokeDynamicInstruction idi ->
cob.invokeDynamicInstruction(DynamicCallSiteDesc.of(
idi.bootstrapMethod(), idi.name().stringValue(),
mapMethodDesc(idi.typeSymbol()),
idi.bootstrapArgs().toArray(ConstantDesc[]::new));
FREQUENCY : always
- duplicates
-
JDK-8304148 Remapping a class with Invokedynamic constant loses static bootstrap arguments
-
- Closed
-