RFR: 8263898: (fs) Files.newOutputStream on the "NUL" special device throws FileSystemException: "nul: Incorrect function" (win)
Brian Burkhalter
bpb at openjdk.java.net
Thu Mar 25 15:28:32 UTC 2021
On Thu, 25 Mar 2021 08:03:02 GMT, Jaikiran Pai <jpai 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.
>
> test/jdk/java/nio/file/Files/NullDevice.java line 34:
>
>> 32: * @run main NullDevice
>> 33: */
>> 34: public class NullDevice {
>
> Hello Brian,
>
> Given what's being tested here, perhaps this test should only be run against Windows OS? So maybe something like `@requires os.family=="windows"`?
You are correct, I intended to but forgot to add that.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3183
More information about the nio-dev
mailing list