Skip to content

8365887: Outdated comments in String::decode#31661

Open
aprilivy wants to merge 1 commit into
openjdk:masterfrom
aprilivy:8365887-outdated-comment-stringdecode
Open

8365887: Outdated comments in String::decode#31661
aprilivy wants to merge 1 commit into
openjdk:masterfrom
aprilivy:8365887-outdated-comment-stringdecode

Conversation

@aprilivy

@aprilivy aprilivy commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

As noted in https://bugs.openjdk.org/browse/JDK-8365887, the comment in String::decode still referred to the old defensive copy / security manager optimization even though that path has been removed.

This updates the comment to describe the current shape of the method: a short-lived CharsetDecoder is created for this decode path, while the ArrayDecoder fast paths decode directly from arrays where possible.



Progress

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

Issue

  • JDK-8365887: Outdated comments in String::decode (Enhancement - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31661

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 24, 2026

Copy link
Copy Markdown

👋 Welcome back aprilivy! 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.

@openjdk

openjdk Bot commented Jun 24, 2026

Copy link
Copy Markdown

@aprilivy 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:

8365887: Outdated comments in String::decode

Reviewed-by: sherman

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 3 new commits pushed to the master branch:

  • 193de1b: 8387185: Locale does not respect numeric singletons
  • e8aaa9e: 8387214: TraceJavaAssertions is unused
  • 3e17dc9: 8386922: Convert TraceRelocator to Unified Logging

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@xuemingshen-oracle) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk Bot added the core-libs core-libs-dev@openjdk.org label Jun 24, 2026
@openjdk

openjdk Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

  • core-libs

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 openjdk Bot added the rfr Pull request is ready for review label Jun 24, 2026
@aprilivy

Copy link
Copy Markdown
Contributor Author

@liach

@mlbridge

mlbridge Bot commented Jun 24, 2026

Copy link
Copy Markdown

Webrevs

@liach

liach commented Jun 24, 2026

Copy link
Copy Markdown
Member

These comments were initially introduced in 3f0b988. I think at the current state, these leftover comments repeat some redundant information and can just be completely nuked.

@xuemingshen-oracle what do you think, since you initially added these comments?

@xuemingshen-oracle xuemingshen-oracle left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jun 24, 2026
@aprilivy

Copy link
Copy Markdown
Contributor Author

/integrate

@openjdk openjdk Bot added the sponsor Pull request is ready to be sponsored label Jun 24, 2026
@openjdk

openjdk Bot commented Jun 24, 2026

Copy link
Copy Markdown

@aprilivy
Your change (at version 7c64b0d) is now ready to be sponsored by a Committer.

@aprilivy

Copy link
Copy Markdown
Contributor Author

@mhaessig Would you mind sponsoring this please? :)

Comment on lines +674 to +676
// Do not cache the CharsetDecoder created here. It is short-lived,
// so young-generation GC should handle it well. The ArrayDecoder
// fast paths below decode directly from arrays where possible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Do not cache the CharsetDecoder created here. It is short-lived,
// so young-generation GC should handle it well. The ArrayDecoder
// fast paths below decode directly from arrays where possible.

This remaining stub IMO is meaningless too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored

Development

Successfully merging this pull request may close these issues.

3 participants