RFR: 8368907: (fs) Windows Error code 1314 not translated to AccessDeniedException (win)
Alan Bateman
alanb at openjdk.org
Sat Oct 11 06:33:01 UTC 2025
On Fri, 10 Oct 2025 20:51:06 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Map Windows error codes ERROR_NETWORK_ACCESS_DENIED and ERROR_PRIVILEGE_NOT_HELD to `java.nio.file.AccessDeniedException`.
Need to delete the stray file #UnixPath.java# that has sneaked in your branch :-)
src/java.base/windows/classes/sun/nio/fs/WindowsException.java line 81:
> 79: IOException ex;
> 80:
> 81: switch (lastError()) {
You can use a switch expression here to `return switch(lastError()) {`, no need for `ex`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27753#issuecomment-3392978128
PR Review Comment: https://git.openjdk.org/jdk/pull/27753#discussion_r2422534564
More information about the nio-dev
mailing list