RFR: 8371689: (fs) CopyMoveHelper.copyToForeignTarget use of sourcePosixView is confusing [v2]

Alan Bateman alanb at openjdk.org
Fri Nov 14 12:44:06 UTC 2025


On Fri, 14 Nov 2025 00:19:31 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> In `CopyMoveHelper`, replace `PosixFileAttributeView` with a `boolean`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8371689: Remove use of FileStore

src/java.base/share/classes/java/nio/file/CopyMoveHelper.java line 114:

> 112:         // retrieve source posix view, null if unsupported
> 113:         final PosixFileAttributeView sourcePosixView =
> 114:             Files.getFileAttributeView(source, PosixFileAttributeView.class);

I don't think we should delete this. Instead, I think we can initialize sourceSupportsPosixAttributes with `Files.getFileAttributeView(source, PosixFileAttributeView.class) != null`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28304#discussion_r2527366691


More information about the nio-dev mailing list