Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8263552: Use String.valueOf() for char-to-String conversions #2660

Closed
wants to merge 2 commits into from

Conversation

stsypanov
Copy link
Contributor

@stsypanov stsypanov commented Feb 20, 2021

This is a very simple and trivial improvement about getting rid of pointless char wrapping into array


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8263552: Use String.valueOf() for char-to-String conversions

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2660/head:pull/2660
$ git checkout pull/2660

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 20, 2021

👋 Welcome back stsypanov! 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 Feb 20, 2021

@stsypanov 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 core-libs core-libs-dev@openjdk.org label Feb 20, 2021
@turbanoff
Copy link
Member

I think it's worth to cleanup other places with similar code too.
I found 6 places in JDK codebase:
изображение

@stsypanov
Copy link
Contributor Author

I think it's worth to cleanup other places with similar code too.

Done

@stsypanov
Copy link
Contributor Author

/issue JDK-8263552

@openjdk openjdk bot changed the title Use String.valueOf() for char-to-String conversion in ObjectStreamClass 8263552: Use String.valueOf() for char-to-String conversion in ObjectStreamClass Mar 13, 2021
@openjdk
Copy link

openjdk bot commented Mar 13, 2021

@stsypanov The primary solved issue for a PR is set through the PR title. Since the current title does not contain an issue reference, it will now be updated.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 13, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 13, 2021

Webrevs

@AlanBateman
Copy link
Contributor

/label add swing

@openjdk openjdk bot added the swing client-libs-dev@openjdk.org label Mar 13, 2021
@openjdk
Copy link

openjdk bot commented Mar 13, 2021

@AlanBateman
The swing label was successfully added.

Copy link
Member

@cl4es cl4es left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented Mar 13, 2021

⚠️ @stsypanov the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout trivial
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Mar 13, 2021

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

8263552: Use String.valueOf() for char-to-String conversions

Reviewed-by: redestad, vtewari, azvegint, chegar

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

  • fac39fe: 8263508: Remove dead code in MethodHandleImpl
  • 7b4aefe: 8263530: sun.awt.X11.ListHelper.removeAll() should use clear()
  • 32c7fcc: 8263490: [macos] Crash occurs on JPasswordField with activated InputMethod
  • 8afec70: 8260931: Implement JEP 382: New macOS Rendering Pipeline
  • 0638303: 8263497: Clean up sun.security.krb5.PrincipalName::toByteArray
  • ba22e6f: 8263446: Avoid unary minus over unsigned type in ObjectSynchronizer::dec_in_use_list_ceiling
  • b371f90: 8263504: Some OutputMachOpcodes fields are uninitialized
  • f7e0a09: 8263425: AArch64: two potential bugs in C1 LIRGenerator::generate_address()
  • 554dd29: 8263564: Consolidate POSIX code for runtime exit support: os::shutdown, os::abort and os::die
  • da9ead5: 8263399: CDS should archive only classes allowed by module system
  • ... and 277 more: https://git.openjdk.java.net/jdk/compare/977a21add8d275dae802a769e6c63675a8ec3ea9...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.

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 (@cl4es, @vyommani, @azvegint, @ChrisHegarty) 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 ready Pull request is ready to be integrated label Mar 13, 2021
@stsypanov
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 13, 2021
@openjdk
Copy link

openjdk bot commented Mar 13, 2021

@stsypanov
Your change (at version 021a4b5) is now ready to be sponsored by a Committer.

@cl4es
Copy link
Member

cl4es commented Mar 14, 2021

I'll sponsor when I'm back to work on Monday, assuming there are no objections.

Copy link
Contributor

@vyommani vyommani left a comment

Choose a reason for hiding this comment

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

LGTM

@cl4es
Copy link
Member

cl4es commented Mar 15, 2021

Ok if we change the summary to "Use String.valueOf() for char-to-String conversions"?

@stsypanov stsypanov changed the title 8263552: Use String.valueOf() for char-to-String conversion in ObjectStreamClass 8263552: Use String.valueOf() for char-to-String conversions Mar 15, 2021
@stsypanov
Copy link
Contributor Author

@cl4es done

@openjdk openjdk bot removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated labels Mar 15, 2021
@cl4es
Copy link
Member

cl4es commented Mar 15, 2021

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 15, 2021

@cl4es This PR has not yet been marked as ready for integration.

@stsypanov
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 15, 2021

@stsypanov This PR has not yet been marked as ready for integration.

@cl4es
Copy link
Member

cl4es commented Mar 15, 2021

It seems the bots haven't seen that I changed the bug summary to match yet.

@stsypanov
Copy link
Contributor Author

@cl4es could you try /sponsor again? I think this time it should be fine.

@openjdk openjdk bot added sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated labels Mar 15, 2021
@cl4es
Copy link
Member

cl4es commented Mar 15, 2021

/sponsor

@openjdk openjdk bot closed this Mar 15, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 15, 2021
@openjdk
Copy link

openjdk bot commented Mar 15, 2021

@cl4es @stsypanov Since your change was applied there have been 287 commits pushed to the master branch:

  • fac39fe: 8263508: Remove dead code in MethodHandleImpl
  • 7b4aefe: 8263530: sun.awt.X11.ListHelper.removeAll() should use clear()
  • 32c7fcc: 8263490: [macos] Crash occurs on JPasswordField with activated InputMethod
  • 8afec70: 8260931: Implement JEP 382: New macOS Rendering Pipeline
  • 0638303: 8263497: Clean up sun.security.krb5.PrincipalName::toByteArray
  • ba22e6f: 8263446: Avoid unary minus over unsigned type in ObjectSynchronizer::dec_in_use_list_ceiling
  • b371f90: 8263504: Some OutputMachOpcodes fields are uninitialized
  • f7e0a09: 8263425: AArch64: two potential bugs in C1 LIRGenerator::generate_address()
  • 554dd29: 8263564: Consolidate POSIX code for runtime exit support: os::shutdown, os::abort and os::die
  • da9ead5: 8263399: CDS should archive only classes allowed by module system
  • ... and 277 more: https://git.openjdk.java.net/jdk/compare/977a21add8d275dae802a769e6c63675a8ec3ea9...master

Your commit was automatically rebased without conflicts.

Pushed as commit c0176c4.

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

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 integrated Pull request has been integrated swing client-libs-dev@openjdk.org
9 participants