RFR: 8342086: FileInputStream.available() fails with "Incorrect function" for "nul" path (win)
Brian Burkhalter
bpb at openjdk.org
Wed Oct 16 17:01:24 UTC 2024
On Wed, 16 Oct 2024 16:56:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Modify the `handleAvailable` native code path to ignore an `ERROR_INVALID_FUNCTION` encountered by `PeekNamedPipe` and update an existing test to verify this change.
If `PeekNamedPipe` fails with `ERROR_INVALID_FUNCTION`, then the number of bytes available is set to zero, the default. The test is updated to JUnit 5 and a sub-test is added for this case of reading form the `NUL` device.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21543#issuecomment-2417404363
More information about the core-libs-dev
mailing list