RFR: 8263898: (fs) Files.newOutputStream on the "NUL" special device throws FileSystemException: "nul: Incorrect function" (win)

Alan Bateman alanb at openjdk.java.net
Thu Mar 25 15:35:29 UTC 2021


On Thu, 25 Mar 2021 15:24:42 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c line 533:
>> 
>>> 531:         }
>>> 532:     }
>>> 533: }
>> 
>> The native methods are meant to map to one win32 call where possible. In this case, I think the workaround needs to be in WindowsChannelFile.open.
>
> I know. I tried at the Java level first and one cannot verify the size of the NUL device from Java.

it's okay to add a new method to WindowsNativeDispatcher if we need it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3183


More information about the nio-dev mailing list