jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8359707: Add classfile modification code to RedefineClassHelper

Open coleenp opened this issue 5 months ago • 7 comments
trafficstars

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.


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issue

  • JDK-8359707: Add classfile modification code to RedefineClassHelper (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25857/head:pull/25857
$ git checkout pull/25857

Update a local copy of the PR:
$ git checkout pull/25857
$ git pull https://git.openjdk.org/jdk.git pull/25857/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25857

View PR using the GUI difftool:
$ git pr show -t 25857

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25857.diff

Using Webrev

Link to Webrev Comment

coleenp avatar Jun 17 '25 17:06 coleenp

:wave: Welcome back coleenp! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Jun 17 '25 17:06 bridgekeeper[bot]

@coleenp This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8359707: Add classfile modification code to RedefineClassHelper

Reviewed-by: lmesnik, dholmes, sspitsyn

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 177 new commits pushed to the master branch:

  • 38f59f84c98dfd974eec0c05541b2138b149def7: 8358179: Performance regression in Math.cbrt
  • e1681c48287bcce6c8f617d9c0c25354dd62870a: 8359477: com/sun/net/httpserver/Test12.java appears to have a temp file race
  • e138297323de3f6990c4c536b1cefd209ce3a69c: 8359436: AOTCompileEagerly should not be diagnostic
  • ... and 174 more: https://git.openjdk.org/jdk/compare/b3f56086c99023a30b91f90c2acbed51b3b17ec0...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

openjdk[bot] avatar Jun 17 '25 17:06 openjdk[bot]

@coleenp The following label will be automatically applied to this pull request:

  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

openjdk[bot] avatar Jun 17 '25 17:06 openjdk[bot]

/label add hotspot-runtime

coleenp avatar Jun 17 '25 17:06 coleenp

@coleenp The hotspot-runtime label was successfully added.

openjdk[bot] avatar Jun 17 '25 17:06 openjdk[bot]

Also added back the byte[] version of the method that I inadvertently deleted.

coleenp avatar Jun 27 '25 11:06 coleenp

Thanks David for the suggested changes for the typos, and for the suggestions.

coleenp avatar Jun 30 '25 16:06 coleenp

Thanks for the reviews Leonid, Serguei and David, and thanks for the help with ClassFile API Chen. /integrate

coleenp avatar Jul 01 '25 17:07 coleenp

Going to push as commit e7a450038a47a76d2e616ebce2a7fa8a51e36ea4. Since your change was applied there have been 177 commits pushed to the master branch:

  • 38f59f84c98dfd974eec0c05541b2138b149def7: 8358179: Performance regression in Math.cbrt
  • e1681c48287bcce6c8f617d9c0c25354dd62870a: 8359477: com/sun/net/httpserver/Test12.java appears to have a temp file race
  • e138297323de3f6990c4c536b1cefd209ce3a69c: 8359436: AOTCompileEagerly should not be diagnostic
  • ... and 174 more: https://git.openjdk.org/jdk/compare/b3f56086c99023a30b91f90c2acbed51b3b17ec0...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Jul 01 '25 17:07 openjdk[bot]

@coleenp Pushed as commit e7a450038a47a76d2e616ebce2a7fa8a51e36ea4.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Jul 01 '25 17:07 openjdk[bot]