RFR: 8263898: (fs) Files.newOutputStream on the "NUL" special device throws FileSystemException: "nul: Incorrect function" (win) [v6]
Alan Bateman
alanb at openjdk.java.net
Tue Mar 30 07:15:30 UTC 2021
On Mon, 29 Mar 2021 18:25:54 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> This request proposes to change the native method `WindowsNativeDispatcher.SetEndOfFile()` to succeed even if the Windows function `SetEndOfFile()` returns zero if `GetFileSizeEx()` called on the handle succeeds and reveals a file size of zero.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8263898: Improve and clean up test
Marked as reviewed by alanb (Reviewer).
test/jdk/java/nio/file/Files/NulDevice.java line 64:
> 62:
> 63: try (final FileChannel ch = FileChannel.open(path, CREATE,
> 64: TRUNCATE_EXISTING, WRITE)) {
Did you mean to put a line break here? Same at L87. Asking because it would be easier to read if the open options were on the same line. If line length is the concern then you could drop the spurious "final" modifier.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3183
More information about the nio-dev
mailing list