On Tue, 3 Sep 2024 21:50:32 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
>> Return the final path derived from the string returned by `canonicalize0()`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8003887: Test getCanonicalPath when the path contains links src/java.base/windows/native/libjava/WinNTFileSystem_md.c line 347: > 345: > 346: if (rv == NULL && !(*env)->ExceptionCheck(env)) { > 347: JNU_ThrowIOExceptionWithLastError(env, "Bad pathname"); // XXX > message? That "not useful" exception message is probably okay because this is what canonicalize has always used. test/jdk/java/io/File/GetCanonicalPath.java line 129: > 127: } > 128: > 129: private static Path createPath(String pathname) throws IOException { This method creates a File, returning a Path to the file, so maybe better method name needed here. test/jdk/java/io/File/GetCanonicalPath.java line 135: > 133: } > 134: > 135: private static boolean testLinks = true; It might be clearer to replace this with supportsLinks and have the tests Assumptions.asserTrue(supportsLinks) so they will be skipped when not supported. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20801#discussion_r1743316741 PR Review Comment: https://git.openjdk.org/jdk/pull/20801#discussion_r1743319200 PR Review Comment: https://git.openjdk.org/jdk/pull/20801#discussion_r1743322928