-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
4833719: (bf) Views of MappedByteBuffers are not MappedByteBuffers, and cannot be forced #2902
Conversation
…nd cannot be forced
👋 Welcome back bpb! A progress list of the required criteria for merging this PR into |
/csr |
@bplb has indicated that a compatibility and specification (CSR) request is needed for this pull request. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
CSR filed: https://bugs.openjdk.java.net/browse/JDK-8263620. |
Once the CSR is reviewed and appoved then this PR will be ready to integrate. |
@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:
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 105 new commits pushed to the
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 |
/integrate |
@bplb Since your change was applied there have been 118 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit b006f22. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please consider this proposal to add covariant overrides to
MappedByteBuffer
for the methodscompact()
,duplicate()
,slice()
, andslice(int,int)
.The methods in question are added as abstract specifications in
MappedByteBuffer
and their implementations inDirect-X-Buffer.java.template
. InMappedByteBuffer
theisSync()
method is changed to have package access, and a final package scope methodFileDescriptor fileDescriptor()
is added to return the associated file descriptor. Specification verbiage is added to the new covariant overrides, and the specification offorce()
is enhanced slightly. (Theunmapper()
method offers an alternative way to obtain the file descriptor and sync mode without the need for package accessfileDescriptor()
andisSync()
methods.)In
Direct-X-Buffer.java.template
the constructor for duplicates and slices is modified to accept parameters for the file descriptor and sync mode for byte buffers. The uses of this constructor are correspondingly modified.A test is added to exercise the new methods. Verifying that
force()
is actually doing anything is not verified by this test but was checked manually. The change passes all other existing tests in tiers 1-3.Other methods for which it might be worth adding covariant overrides are the
get()
andput()
methods which return a buffer, and, less interesting, theput$Type$()
methods.Progress
Issue
Reviewers
Download
To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/2902/head:pull/2902
$ git checkout pull/2902
To update a local copy of the PR:
$ git checkout pull/2902
$ git pull https://git.openjdk.java.net/jdk pull/2902/head