Skip to content

8261880: Change nested classes in java.base to static nested classes where possible #2589

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

Closed
wants to merge 2 commits into from

Conversation

stsypanov
Copy link
Contributor

@stsypanov stsypanov commented Feb 16, 2021

Non-static classes hold a link to their parent classes, which in many cases can be avoided.


Progress

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

Issue

  • JDK-8261880: Change nested classes in java.base to static nested classes where possible

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/2589/head:pull/2589
$ git checkout pull/2589

Update a local copy of the PR:
$ git checkout pull/2589
$ git pull https://git.openjdk.java.net/jdk pull/2589/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2589

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/2589.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 16, 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 16, 2021

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

  • core-libs
  • hotspot-compiler
  • net
  • nio
  • security

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.

@openjdk openjdk bot added security security-dev@openjdk.org nio nio-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org net net-dev@openjdk.org labels Feb 16, 2021
@AlanBateman
Copy link
Contributor

/issue JDK-8261880

@AlanBateman
Copy link
Contributor

/issue add JDK-8261880

@openjdk
Copy link

openjdk bot commented Feb 17, 2021

@AlanBateman Only the author (@stsypanov) is allowed to issue the /issue command.

@openjdk
Copy link

openjdk bot commented Feb 17, 2021

@AlanBateman Only the author (@stsypanov) is allowed to issue the /issue command.

@stsypanov stsypanov changed the title In java.base make nested classes static where possible 8261880: Change nested classes in java.base to static nested classes where possible Feb 17, 2021
@stsypanov
Copy link
Contributor Author

/issue JDK-8261880

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 17, 2021
@openjdk
Copy link

openjdk bot commented Feb 17, 2021

@stsypanov This issue is referenced in the PR title - it will now be updated.

@mlbridge
Copy link

mlbridge bot commented Feb 17, 2021

Webrevs

Copy link
Member

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

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

The changes in java/net look ok to me.

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 21, 2021

@stsypanov This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@stsypanov
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 21, 2021

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 19, 2021

@stsypanov This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@stsypanov
Copy link
Contributor Author

Any more comments?

@desruisseaux
Copy link
Contributor

desruisseaux commented May 20, 2021

Just for information there is similar issues in javax.imageio.metadata.IIOMetadataFormatImpl class in the java.desktop module.

@cl4es
Copy link
Member

cl4es commented May 20, 2021

/sponsor

@openjdk
Copy link

openjdk bot commented May 20, 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 static
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented May 20, 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:

8261880: Change nested classes in java.base to static nested classes where possible

Reviewed-by: redestad

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

  • 459abd5: 8267219: Javadoc method summary breaks when {@inheritdoc} from an empty parent
  • aba2265: 8260267: ZGC: Reduce mark stack usage
  • f979523: 8267463: Problemlist runtime/os/TestTracePageSizes.java on linux-aarch64 to reduce noise
  • f07dcf4: 8264290: Create implementation for NSAccessibilityComponentGroup protocol peer
  • 31320c3: 8267262: com/sun/net/httpserver/Filter improve API documentation of static methods
  • 7dcb9fd: 8265684: implement Sealed Classes as a standard feature in Java, javadoc changes
  • 0fa9223: 8260517: implement Sealed Classes as a standard feature in Java
  • 31b98e1: 8265319: implement Sealed Classes as a standard feature in Java, javax.lang.model changes
  • 726785b: 8267155: runtime/os/TestTracePageSizes times out
  • 8e3549f: 8266332: Adler32 intrinsic for x86 64-bit platforms
  • ... and 1373 more: https://git.openjdk.java.net/jdk/compare/cb84539d56209a6687c4ec71a61fdbe6f06a46ea...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 (@ChrisHegarty, @cl4es) 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 May 20, 2021
@openjdk
Copy link

openjdk bot commented May 20, 2021

@cl4es The change author (@stsypanov) must issue an integrate command before the integration can be sponsored.

@stsypanov
Copy link
Contributor Author

/integrate

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

openjdk bot commented May 20, 2021

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

@stsypanov
Copy link
Contributor Author

@cl4es now you can sponsor :)

@cl4es
Copy link
Member

cl4es commented May 20, 2021

/sponsor

@openjdk openjdk bot closed this May 20, 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 May 20, 2021
@openjdk
Copy link

openjdk bot commented May 20, 2021

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

  • 459abd5: 8267219: Javadoc method summary breaks when {@inheritdoc} from an empty parent
  • aba2265: 8260267: ZGC: Reduce mark stack usage
  • f979523: 8267463: Problemlist runtime/os/TestTracePageSizes.java on linux-aarch64 to reduce noise
  • f07dcf4: 8264290: Create implementation for NSAccessibilityComponentGroup protocol peer
  • 31320c3: 8267262: com/sun/net/httpserver/Filter improve API documentation of static methods
  • 7dcb9fd: 8265684: implement Sealed Classes as a standard feature in Java, javadoc changes
  • 0fa9223: 8260517: implement Sealed Classes as a standard feature in Java
  • 31b98e1: 8265319: implement Sealed Classes as a standard feature in Java, javax.lang.model changes
  • 726785b: 8267155: runtime/os/TestTracePageSizes times out
  • 8e3549f: 8266332: Adler32 intrinsic for x86 64-bit platforms
  • ... and 1373 more: https://git.openjdk.java.net/jdk/compare/cb84539d56209a6687c4ec71a61fdbe6f06a46ea...master

Your commit was automatically rebased without conflicts.

Pushed as commit 9425d3d.

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

@stsypanov stsypanov deleted the static branch May 20, 2021 14:29
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 hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated net net-dev@openjdk.org nio nio-dev@openjdk.org security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

7 participants