Skip to content

Conversation

@vy
Copy link
Contributor

@vy vy commented Oct 27, 2025

JDK-6636319 introduced ArrayEncoder, composed of only encode method. Later on JDK-8054307 (JEP 254: Compact Strings) removed all its usages. This method can safely be removed, hence this PR. Confirmed that tier1-2 tests are clear on several platforms after changes.


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-8363925: Remove unused sun.nio.cs.ArrayEncoder::encode (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27999

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 27, 2025

👋 Welcome back vyazici! 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
Copy link

openjdk bot commented Oct 27, 2025

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

8363925: Remove unused sun.nio.cs.ArrayEncoder::encode

Reviewed-by: liach

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 25 new commits pushed to 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.

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

@openjdk
Copy link

openjdk bot commented Oct 27, 2025

@vy The following labels will be automatically applied to this pull request:

  • i18n
  • nio

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

@vy vy marked this pull request as ready for review October 27, 2025 12:28
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 27, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 27, 2025

Webrevs

Co-authored-by: Roger Riggs <[email protected]>
Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

I recommend further refactors, at least turn the 3 default methods to abstract methods. After removal of ineffective CESU_8, we can make the default methods abstract to improve safety.

Down the road, we can remove the -1 handling at use site, and also pass in dp explicitly (I recall this being useful for optimizing Writer/OutputStream)

@openjdk
Copy link

openjdk bot commented Oct 28, 2025

@vy Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Oct 28, 2025

@vy core-libs has been added to this pull request based on files touched in new commit(s).

@vy
Copy link
Contributor Author

vy commented Oct 28, 2025

@liach, thanks so much for the review! 🙇

I recommend further refactors, at least turn the 3 default methods to abstract methods.
After removal of ineffective CESU_8, we can make the default methods abstract to improve safety.
Down the road, we can remove the -1 handling at use site, and also pass in dp explicitly

All done in 7fc5267.

I recall this [passing dp explicitly] being useful for optimizing Writer/OutputStream

Skimmed through ArrayEncoder::encodeFrom* call-sites, but could not spot anything particular that can quickly be addressed.

Please let me know if there are any changes I can carry out within the scope of this JBS/PR.

Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Thank you for this great cleanup. Looks much more maintainable and straightforward. We can re-implement for CESU_8 if there is request later.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs [email protected] i18n [email protected] nio [email protected] ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants