Skip to content

8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE #5878

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

Conversation

turbanoff
Copy link
Member

@turbanoff turbanoff commented Oct 9, 2021


Progress

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

Issue

  • JDK-8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5878

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 9, 2021

👋 Welcome back turbanoff! 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 9, 2021

@turbanoff 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 Oct 9, 2021
@turbanoff turbanoff changed the title [PATCH] Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE Oct 9, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 9, 2021
@mlbridge
Copy link

mlbridge bot commented Oct 9, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Oct 10, 2021

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

8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE

Reviewed-by: prappo, jlaskey, martin

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

  • cfe7471: 8177814: jdk/editpad is not in jdk TEST.groups
  • a5f09d1: 8275031: runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails when hsdis is present
  • ef0922e: 8274560: JFR: Add test for OldObjectSample event when using Shenandoah
  • 1e30695: 8274466: G1: use field directly rather than method in G1CollectorState::in_mixed_phase
  • dd93c6e: 8272167: AbsPathsInImage.java should skip *.dSYM directories
  • 829dea4: 8274945: Cleanup unnecessary calls to Throwable.initCause() in java.desktop
  • 75f5145: 8274925: Shenandoah: shenandoah/TestAllocHumongousFragment.java test failed on lock rank check
  • 83c3771: 8273881: Metaspace: test repeated deallocations
  • 3f01d03: 8275021: Test serviceability/sa/TestJmapCore.java fails with: java.io.IOException: Stack frame 0x4 not found
  • 3f07337: 8273614: Shenandoah: intermittent timeout with ConcurrentGCBreakpoint tests
  • ... and 14 more: https://git.openjdk.java.net/jdk/compare/6d1d4d52928ed38bbc73ddcbede5389995a8e65f...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 (@pavelrappo, @JimLaskey, @Martin-Buchholz) 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 Oct 10, 2021
@pavelrappo
Copy link
Member

Oops. I think we should also do something about this occurrence of MAX_ARRAY_SIZE:

* {@code (MAX_ARRAY_SIZE >> coder)} unless the given minimum capacity

Copy link
Member

@Martin-Buchholz Martin-Buchholz left a comment

Choose a reason for hiding this comment

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

JDK sources should not contain dead unused fields - thanks for fixing.

The change to use newLength in this file should have adjusted the javadoc of newCapacity, perhaps simply to refer to ArraysSupport.SOFT_MAX_ARRAY_LENGTH instead.

That sounds like a job for Jim Laskey as the author of
commit 03642a0
Author: Jim Laskey jlaskey@openjdk.org
Date: Thu Jun 11 10:08:23 2020 -0300

8230744: Several classes throw OutOfMemoryError without message

Reviewed-by: psandoz, martin, bchristi, rriggs, smarks

If that is fixed (perhaps in a different commit), then this commit is good.

History has shown that capacity growth code is highly errorprone, so it's worth writing whitebox tests, as I did in e.g.

./java/util/concurrent/ConcurrentHashMap/WhiteBox.java
./java/util/ArrayDeque/WhiteBox.java
./java/util/HashMap/WhiteBoxResizeTest.java

update javadoc of 'newCapacity' method to refer ArraysSupport.SOFT_MAX_ARRAY_LENGTH instead
@pavelrappo
Copy link
Member

I'll run tests; if they pass, I'll sponsor the change.

Copy link
Member

@Martin-Buchholz Martin-Buchholz left a comment

Choose a reason for hiding this comment

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

We generally avoid in javadoc.
Especially in private javadoc.
I would write this more simply/readably as

  • {@code SOFT_MAX_ARRAY_LENGTH >> coder}

@turbanoff
Copy link
Member Author

/integrate

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

openjdk bot commented Oct 12, 2021

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

@pavelrappo
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 12, 2021

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

  • cfe7471: 8177814: jdk/editpad is not in jdk TEST.groups
  • a5f09d1: 8275031: runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails when hsdis is present
  • ef0922e: 8274560: JFR: Add test for OldObjectSample event when using Shenandoah
  • 1e30695: 8274466: G1: use field directly rather than method in G1CollectorState::in_mixed_phase
  • dd93c6e: 8272167: AbsPathsInImage.java should skip *.dSYM directories
  • 829dea4: 8274945: Cleanup unnecessary calls to Throwable.initCause() in java.desktop
  • 75f5145: 8274925: Shenandoah: shenandoah/TestAllocHumongousFragment.java test failed on lock rank check
  • 83c3771: 8273881: Metaspace: test repeated deallocations
  • 3f01d03: 8275021: Test serviceability/sa/TestJmapCore.java fails with: java.io.IOException: Stack frame 0x4 not found
  • 3f07337: 8273614: Shenandoah: intermittent timeout with ConcurrentGCBreakpoint tests
  • ... and 14 more: https://git.openjdk.java.net/jdk/compare/6d1d4d52928ed38bbc73ddcbede5389995a8e65f...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 12, 2021

@pavelrappo @turbanoff Pushed as commit 7d2633f.

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

@turbanoff turbanoff deleted the remove_unused_AbstractStringBuilder.MAX_ARRAY_SIZE branch February 21, 2022 12:34
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
Development

Successfully merging this pull request may close these issues.

5 participants