On Tue, 23 May 2023 22:49:57 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
> In `java.io.File`, change the constructors `File(File,String)` and > `File(String,String)` so that they do not for typical cases return a `File` > whose path has a trailing name separator. src/java.base/unix/classes/java/io/UnixFileSystem.java line 109: > 107: if (len > 1 && s.charAt(len - 1) == '/') > 108: return s.substring(0, len - 1); > 109: return s; If there are multiple trailing `/`, is it sufficient to remove only a single `/`? Does this have the same result as `normalize(pathname)`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14109#discussion_r1204387220