The following code snippets should fail but it do not:
1. Trailing space in a file name
File f = new File("Something ");
String s = f.getCanonicalPath();
2. Trailing space in a directory name
File f = new File("foo\\bar \\gus");
String s = f.getCanonicalPath();
1. Trailing space in a file name
File f = new File("Something ");
String s = f.getCanonicalPath();
2. Trailing space in a directory name
File f = new File("foo\\bar \\gus");
String s = f.getCanonicalPath();
- relates to
-
JDK-8354409 Parsing a file path on Windows with a trailing space in a name element ("...\ kjdd ggf \...") is rejected
-
- Open
-
- links to
-
Review(master) openjdk/jdk/24635