RFR: 8356548: Use ClassFile API instead of ASM to transform classes in tests [v7]

Serguei Spitsyn sspitsyn at openjdk.org
Wed Oct 15 06:09:17 UTC 2025


On Wed, 15 Oct 2025 06:03:49 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
>> 
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/asm-test-upgrade
>>  - Ioi review
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/asm-test-upgrade
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/asm-test-upgrade
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/asm-test-upgrade
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/asm-test-upgrade
>>  - Merge branch 'fix/asm-test-upgrade' of github.com:liachmodded/jdk into fix/asm-test-upgrade
>>  - Update test/hotspot/jtreg/compiler/calls/common/InvokeDynamicPatcher.java
>>    
>>    Co-authored-by: Andrew Haley <aph-open at littlepinkcloud.com>
>>  - Variable name improvements
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into fix/asm-test-upgrade
>>  - ... and 6 more: https://git.openjdk.org/jdk/compare/e7527539...25972f2d
>
> test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineRetransform/RedefineRetransform.java line 102:
> 
>> 100:     // Extracts ClassVersion values from the provided class bytes.
>> 101:     private static int getClassBytesVersion(byte[] classBytes) {
>> 102:         ClassModel clazz = ClassFile.of().parse(classBytes);
> 
> Nit: Better to make it consistent with the case below and call it `classModel` instead of `clazz`.

BTW, thank you for previous re-naming.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25124#discussion_r2431221860


More information about the serviceability-dev mailing list