RFR: 8359707: Add classfile modification code to RedefineClassHelper [v6]
Coleen Phillimore
coleenp at openjdk.org
Fri Jun 27 11:37:31 UTC 2025
On Fri, 27 Jun 2025 04:21:01 GMT, David Holmes <dholmes at openjdk.org> wrote:
>>> the lambda just copies everything over as-is.
>> ..
>>> But be aware this code does not change the class name use anywhere in the code, descriptors, handles, annotation, etc..., just the class name itself.
>>
>> @coleenp don't we need to class name to be changed everywhere it appears in the classfile? Or do we know these classes are trivial enough that there is only a single occurrence of the name (and everything else is symbolic via the constant pool) ?
>
> And `replaceAllStrings` is incorrectly named in that case.
I think if we add less trivial classes to be redefined, we might need to upgrade this to the ClassRemapper. For now this only renames the classfile. I've renamed the method.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25857#discussion_r2171711787
More information about the serviceability-dev
mailing list