jdk
jdk copied to clipboard
6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified
Add some verbiage stating that the outcome of invoking the absolute write method java.nio.channels.write(ByteBuffer,long) is unspecified when the channel was opened with the APPEND option present.
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
- [ ] Change requires a CSR request to be approved
Issues
- JDK-6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified
- JDK-8295312: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified (CSR)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10707/head:pull/10707
$ git checkout pull/10707
Update a local copy of the PR:
$ git checkout pull/10707
$ git pull https://git.openjdk.org/jdk pull/10707/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10707
View PR using the GUI difftool:
$ git pr show -t 10707
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10707.diff
:wave: 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.
@bplb The following label will be automatically applied to this pull request:
nio
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.
If something has a file opened for append then it's a bug to attempt to write and specify a position. It would be possible to detect this, throw an exception, and thus avoid bugs. However it would be a behavior change. The conservative approach is to specify that it leads to unspecified behavior as you have done.
@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:
6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified
Reviewed-by: 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 40 new commits pushed to the master branch:
- 21a825e059170e3a069b9f0982737c5839e6dae2: 8288387: GetLocalXXX/SetLocalXXX spec should require suspending target thread
- 8d751de3198675b22704cdccafaff2fc0fdd3f59: 8295231: Move all linking of native libraries to make
- f300ec8631b781938e6e96165ba23cda14a20f24: 8294546: document where javac differs when invoked via launcher and ToolProvider
- b269c51d10c353d9b7143b2239beb23c01352182: 8295395: Linux Alpha Zero builds fail after JDK-8292591
- ae60599e2ba75d80c3b4279903137b2c549f8066: 8295023: Interpreter(AArch64): Implement -XX:+PrintBytecodeHistogram and -XX:+PrintBytecodePairHistogram options
- 4d37ef2d545c016e6c3ad52171ea961d4406726f: 8295262: Build binutils out of source tree
- 0919a3a0c198a5234b5ed9a3bb999564d2382a56: 8294186: AArch64: VectorMaskToLong failed on SVE2 machine with -XX:UseSVE=1
- ec2981b83bc3ef6977b5f16d5222eb49b0ea49ad: 8293711: Factor out size parsing functions from arguments.cpp
- 5d273b9f040a9884e2ae5b0f1409a3f9075c51c9: 8295278: Add parallel class loading tests
- 172006c0e9433046252bd79e8864890ab7c0ce56: 8295333: G1: Remove unnecessary check in G1Policy::calculate_desired_eden_length_by_mmu
- ... and 30 more: https://git.openjdk.org/jdk/compare/fdb74ed45240477bd08eb40ede5eaa2345ca6b5d...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.
/integrate
Going to push as commit d1f794587cbac221649114b71f2fce5e1f8b7e49.
Since your change was applied there have been 60 commits pushed to the master branch:
- 5dbd49511518819acbbff9968cdf426af759cf2c: 8295457: Make the signatures of write barrier methods consistent
- 7b2e83b3955c034208325ea5477afd3c5e1da41a: 8295469: S390X: Optimized builds are broken
- 63867c4b52a331f8d77f2c32dc8053c0f990dfc6: 8295433: EpsilonHeap doesn't need to override post_initialize()
- e7375f9c527fd86dc1414a308a440903fb9f22da: 8295468: RISC-V: Minimal builds are broken
- bd41428a5602e59034e61bf34eed686d4c7b052a: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction
- 78fed9d3074ecfde5dfcd31f433ba104ad059d21: 7175397: The divider color is not changed to green when dragging for Nimbus LaF.
- 8c40b7dc8cd7b6a6d0c9349b991e0e01b69349c3: 8292177: InitialSecurityProperty JFR event
- e7a964b4dbbdd21eba87dc94eb3680e9553f5039: 8295268: Optimized builds are broken due to incorrect assert_is_rfp shortcuts
- 0b7d811c98cb45a822b7ef56e5ee99d1b5483e78: 8294730: Add @throws and @implNote clauses to BigInteger::isProblablePrime and BigInteger::nextProblablePrime
- 4434cbb719db37880b48474ba342f300ed4828a8: 8295264: Fix PaX check on RISC-V
- ... and 50 more: https://git.openjdk.org/jdk/compare/fdb74ed45240477bd08eb40ede5eaa2345ca6b5d...master
Your commit was automatically rebased without conflicts.
@bplb Pushed as commit d1f794587cbac221649114b71f2fce5e1f8b7e49.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.