RFR: 8361183: JDK-8360887 needs fixes to avoid cycles and better tests (aix) [v2]
Martin Doerr
mdoerr at openjdk.org
Tue Jul 1 20:08:21 UTC 2025
On Tue, 1 Jul 2025 14:20:33 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use UnixPath.toUnixPath().
>
> src/java.base/aix/classes/sun/nio/fs/AixFileSystemProvider.java line 74:
>
>> 72: return supportsUserDefinedFileAttributeView(obj) ?
>> 73: (V) new AixUserDefinedFileAttributeView(UnixPath.toUnixPath(obj), Util.followLinks(options))
>> 74: : null;
>
> Can you try this:
>
> if (type == UserDefinedFileAttributeView.class) {
> UnixPath file = UnixPath.toUnixPath(obj);
> return supportsUserDefinedFileAttributeView(file) ? ..
>
>
> That will remove the cast/check from supportsUserDefinedFileAttributeView and also ensure that ProviderMismatchException is thrown if called with a Path from a different provider.
I like this version much better. Changed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26066#discussion_r2178430857
More information about the nio-dev
mailing list