On Thu, 12 Feb 2026 13:47:49 GMT, Jean-Philippe Bempel <[email protected]>
wrote:
>> …retransformed
>>
>> Fix a retransform error when retransforming a record with type annotation.
>> processing the record type annotation was done by calling the wrong method
>> and using the one to process regular annotation. Regular annotations have
>> not the same structure and decoding was therefore incorrect. The decoding
>> methods detect a problem but this error was not propagated correctly outside
>> of VM_RedfineClass::load_new_class_versions method, swallowing the error and
>> leaving the retransformed class in bad state.
>>
>> Here we have fixed the call to the right method for decoding the type
>> annotations but also propagated the error when rewriting the constant pool
>> as an JVMTI_ERROR_INTERNAL
>
> Jean-Philippe Bempel has updated the pull request incrementally with one
> additional commit since the last revision:
>
> fix whitespaces
I still have issues with the test - sorry.
test/jdk/java/lang/instrument/RetransformRecordTypeAnn/MyRecord.java line 44:
> 42: }
> 43:
> 44: @Target({ ElementType.TYPE_USE })
Suggestion:
@Target({ElementType.TYPE_USE })
test/jdk/java/lang/instrument/RetransformRecordTypeAnn/altered/MyRecord.jcod
line 27:
> 25: * This is a jcod version of the MyRecord classfile.
> 26: * Generated from runnning java -jar asmtools.jar jdec MyRecord.class
> 27: * Then slightly modified (swapped some constants) to trigger constant
> pool rewrite.
Please show the modified lines and what was changed.
-------------
Changes requested by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29445#pullrequestreview-3858480668
PR Review Comment: https://git.openjdk.org/jdk/pull/29445#discussion_r2856938569
PR Review Comment: https://git.openjdk.org/jdk/pull/29445#discussion_r2856964990