RFR: 8307976: (fs) Files.createDirectories(dir) returns dir::toAbsolutePath instead of dir
Alan Bateman
alanb at openjdk.org
Fri May 12 17:33:48 UTC 2023
On Fri, 12 May 2023 17:00:48 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Return `dir`, not `dir::toAbsolutePath`.
src/java.base/share/classes/java/nio/file/Files.java line 769:
> 767: }
> 768: // find a descendant that exists
> 769: Path parent = absDir.getParent();
This will NPE if SecurityException is thrown, can't initialise absDir to null.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13959#discussion_r1192635235
More information about the nio-dev
mailing list