On Tue, 8 Jul 2025 16:34:47 GMT, Mikhail Yankelevich <myankelev...@openjdk.org> wrote:
>> Refactored extract method to encapsulate Windows specific test logic > > test/jdk/java/io/File/MaxPathLength.java line 200: > >> 198: String name = fileName; >> 199: while (name.length() < MAX_LENGTH) { >> 200: testLongPath (20, name, false); > > Nitpick: do you think there is a need for a space before the `(`? Looks odd > imo. But as the whole file uses this, I'm fine with you leaving this as is Yeah, was just being coherent > test/jdk/java/io/File/MaxPathLength.java line 202: > >> 200: testLongPath (20, name, false); >> 201: testLongPath (20, name, true); >> 202: name = getNextName(name); > > Name doesn't seem to be used after. Do you think it might be beneficial to > add an assert here to check if the result is the same as expected ? > Same applies to the main method I agree it would be beneficial. Would this be a valid assert to add after those while loops? `assert name.length() >= MAX_LENGTH : "Unexpected final name length: " + name.length();` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26193#discussion_r2194837326 PR Review Comment: https://git.openjdk.org/jdk/pull/26193#discussion_r2194858448