RFR: 8361183: JDK-8360887 needs fixes to avoid cycles and better tests (aix)

Alan Bateman alanb at openjdk.org
Tue Jul 1 14:23:41 UTC 2025


On Tue, 1 Jul 2025 12:07:13 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> Follow-up for https://github.com/openjdk/jdk/pull/26021. See latest comments there.

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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26066#discussion_r2177737962


More information about the nio-dev mailing list