RFR: 8359707: Add classfile modification code to RedefineClassHelper [v10]
David Holmes
dholmes at openjdk.org
Mon Jun 30 12:32:42 UTC 2025
On Mon, 30 Jun 2025 11:38:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> I copied this code for another test in the Valhalla repo and thought it would be a good utility function. It might be better written using the Classfile API.
>> Tested with test.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Upgraded comment, and removed oldClassName from the bytes version.
Update looks good. Just a couple of typos - sorry.
test/lib/RedefineClassHelper.java line 80:
> 78:
> 79: /*
> 80: * Copy the class defined by `bytes`, replacing the nameof the class with `newClassName`,
Suggestion:
* Copy the class defined by `bytes`, replacing the name of the class with `newClassName`,
test/lib/RedefineClassHelper.java line 85:
> 83: * @param bytes read from the original class file.
> 84: * @param newClassName new class name for the returned class representation
> 85: * @return a copy of the class representated by `bytes` but with the name `newClassName`
Suggestion:
* @return a copy of the class represented by `bytes` but with the name `newClassName`
test/lib/RedefineClassHelper.java line 99:
> 97: * @param oldClassName old class name.
> 98: * @param newClassName new class name to replace with old class name.
> 99: * @return a copy of the class representated by `bytes` but with the name `newClassName`
Suggestion:
* @return a copy of the class represented by `bytes` but with the name `newClassName`
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25857#pullrequestreview-2971040481
PR Review Comment: https://git.openjdk.org/jdk/pull/25857#discussion_r2174957181
PR Review Comment: https://git.openjdk.org/jdk/pull/25857#discussion_r2174958951
PR Review Comment: https://git.openjdk.org/jdk/pull/25857#discussion_r2174960419
More information about the serviceability-dev
mailing list