RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win) [v2]
Alan Bateman
alanb at openjdk.org
Wed Apr 16 07:36:46 UTC 2025
On Wed, 16 Apr 2025 00:42:22 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> In `java.io.WinNTFileSystem::isInvalid`, replace an insufficient test for file path validity with a sufficient test for file path invalidity. Also, add a new test.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8354450: Add specific conditional for trailing space; adjust test
src/java.base/windows/classes/java/io/WinNTFileSystem.java line 372:
> 370: int len = pathname.length();
> 371: if (len > 0 && pathname.charAt(len - 1) == ' ')
> 372: return true;
Can you think about "foo \bar" case too?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24635#discussion_r2046283524
More information about the core-libs-dev
mailing list