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

8263742: (bf) MappedByteBuffer.force() should use the capacity as its upper bound #3052

Closed

Conversation

bplb
Copy link
Member

@bplb bplb commented Mar 17, 2021

Prior to JDK 15, the method java.nio.MappedByteBuffer.force() wrote back the entire contents of the buffer, i.e., the half-open range [0,capacity()). In JDK 15 the upper bound of the write-back changed from capacity() to limit(). The change was inadvertent through a chain of fixes outlined in the description of the associated issue. This request is to change back to the previous behavior and use the capacity instead of the limit as the upper bound of the write-back.


Progress

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

Issue

  • JDK-8263742: (bf) MappedByteBuffer.force() should use the capacity as its upper bound

Reviewers

Download

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

To update a local copy of the PR:
$ git checkout pull/3052
$ git pull https://git.openjdk.java.net/jdk pull/3052/head

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 17, 2021

👋 Welcome back bpb! 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 added the rfr Pull request is ready for review label Mar 17, 2021
@openjdk
Copy link

openjdk bot commented Mar 17, 2021

@bplb To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • 2d
  • awt
  • beans
  • build
  • compiler
  • core-libs
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah
  • sound
  • swing

@bplb
Copy link
Member Author

bplb commented Mar 17, 2021

/csr

@bplb
Copy link
Member Author

bplb commented Mar 17, 2021

/label add nio

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Mar 17, 2021
@openjdk
Copy link

openjdk bot commented Mar 17, 2021

@bplb has indicated that a compatibility and specification (CSR) request is needed for this pull request.
@bplb please create a CSR request and add link to it in JDK-8263742. This pull request cannot be integrated until the CSR request is approved.

@openjdk openjdk bot added the nio nio-dev@openjdk.org label Mar 17, 2021
@openjdk
Copy link

openjdk bot commented Mar 17, 2021

@bplb
The nio label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Mar 17, 2021

Webrevs

Copy link
Contributor

@adinn adinn left a comment

Choose a reason for hiding this comment

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

Looks good.

@bplb
Copy link
Member Author

bplb commented Mar 18, 2021

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Mar 18, 2021
@openjdk
Copy link

openjdk bot commented Mar 18, 2021

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

8263742: (bf) MappedByteBuffer.force() should use the capacity as its upper bound

Reviewed-by: adinn, alanb

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

  • c82a673: 8262001: java/lang/management/ThreadMXBean/ResetPeakThreadCount.java failed with "RuntimeException: Current Peak = 14 Expected to be == previous peak = 7 + 8"
  • 01ddf3d: 8263622: The java.awt.color.ICC_Profile#setData invert the order of bytes for the "head" tag
  • e34f766: 8252723: Run stack016.java also with C2-only
  • 2173fed: 8263439: getSupportedAttributeValues() throws NPE for Finishings attribute
  • e543a50: 8261352: Create implementation for component peer for all the components who should be ignored in a11y interactions
  • 21db0f6: 8263659: Reflow GTestResultParser for better readability
  • e333b6e: 8246494: introduce vm.flagless at-requires property
  • 8c8d1b3: 8263495: Gather liveness info in the mark phase of G1 full gc
  • a85dc55: 8263311: Watch registry changes for remote printers update instead of polling
  • 3f31a6b: 8263775: C2: igv_print() crash unexpectedly when called from debugger
  • ... and 57 more: https://git.openjdk.java.net/jdk/compare/4d1c08ca99e9d9d41de184adccb3fde3f50d6358...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.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 18, 2021
@bplb
Copy link
Member Author

bplb commented Mar 18, 2021

/integrate

@openjdk openjdk bot closed this Mar 18, 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 labels Mar 18, 2021
@openjdk
Copy link

openjdk bot commented Mar 18, 2021

@bplb Since your change was applied there have been 67 commits pushed to the master branch:

  • c82a673: 8262001: java/lang/management/ThreadMXBean/ResetPeakThreadCount.java failed with "RuntimeException: Current Peak = 14 Expected to be == previous peak = 7 + 8"
  • 01ddf3d: 8263622: The java.awt.color.ICC_Profile#setData invert the order of bytes for the "head" tag
  • e34f766: 8252723: Run stack016.java also with C2-only
  • 2173fed: 8263439: getSupportedAttributeValues() throws NPE for Finishings attribute
  • e543a50: 8261352: Create implementation for component peer for all the components who should be ignored in a11y interactions
  • 21db0f6: 8263659: Reflow GTestResultParser for better readability
  • e333b6e: 8246494: introduce vm.flagless at-requires property
  • 8c8d1b3: 8263495: Gather liveness info in the mark phase of G1 full gc
  • a85dc55: 8263311: Watch registry changes for remote printers update instead of polling
  • 3f31a6b: 8263775: C2: igv_print() crash unexpectedly when called from debugger
  • ... and 57 more: https://git.openjdk.java.net/jdk/compare/4d1c08ca99e9d9d41de184adccb3fde3f50d6358...master

Your commit was automatically rebased without conflicts.

Pushed as commit fa0f161.

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

@bplb bplb deleted the MappedByteBuffer-force-capacity-8263742 branch March 18, 2021 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated nio nio-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants