RFR: 8363720: Follow up to JDK-8360411 with post review comments [v3]
Darragh Conway
duke at openjdk.org
Thu Jul 31 20:58:55 UTC 2025
On Tue, 29 Jul 2025 18:48:10 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Darragh Conway has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix remaining indentation errors (From my first commit on this branch)
>
> test/jdk/java/io/File/MaxPathLength.java line 69:
>
>> 67: }
>> 68:
>> 69: private static void setIsWindows() {
>
> Instead of `isWindows` and `setIsWindows`, perhaps you should consider using `jdk.test.lib.Platform.isWindows()`? See, for example, [GetXSpace.java](https://github.com/openjdk/jdk/blob/master/test/jdk/java/io/File/GetXSpace.java), lines 30-31, 46, and 109.
Is it better to keep the variable isWindows and call Platform.isWindows() upon creating the variable? For example:
`private static boolean isWindows = Platform.isWindows();`
and just leave it like this:
line 64
if (isWindows) {
testLongPath();
}
line 145
if (isWindows &&
!fu.getCanonicalPath().equals(f.getCanonicalPath()))
throw new RuntimeException ("getCanonicalPath() failed");
Or is the last commit sufficient?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26445#discussion_r2246363303
More information about the core-libs-dev
mailing list