RFR: 8360411: [TEST] open/test/jdk/java/io/File/MaxPathLength.java Refactor extract method to encapsulate Windows specific test logic

Mikhail Yankelevich myankelevich at openjdk.org
Wed Jul 9 15:30:13 UTC 2025


On Tue, 8 Jul 2025 16:10:17 GMT, Darragh Conway <duke at openjdk.org> wrote:

> Refactored extract method to encapsulate Windows specific test logic

Looks good, just a minor comment

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

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

-------------

PR Review: https://git.openjdk.org/jdk/pull/26193#pullrequestreview-2998367222
PR Review Comment: https://git.openjdk.org/jdk/pull/26193#discussion_r2192969397
PR Review Comment: https://git.openjdk.org/jdk/pull/26193#discussion_r2192993404


More information about the core-libs-dev mailing list