RFR: 8359707: Add classfile modification code to RedefineClassHelper [v2]
Leonid Mesnik
lmesnik at openjdk.org
Fri Jun 20 21:40:28 UTC 2025
On Wed, 18 Jun 2025 11:52:17 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:
>
> Add a byte buffer version and rename parameters.
Changes requested by lmesnik (Reviewer).
test/lib/RedefineClassHelper.java line 68:
> 66:
> 67: private static byte[] getBytecodes(ClassLoader loader, String name) throws Exception {
> 68: InputStream is = loader.getResourceAsStream(name + ".class");
I think this should be
try(InputStream is = loader.getResourceAsStream(name + ".class");) {
...
-------------
PR Review: https://git.openjdk.org/jdk/pull/25857#pullrequestreview-2947314649
PR Review Comment: https://git.openjdk.org/jdk/pull/25857#discussion_r2159689305
More information about the serviceability-dev
mailing list