RFR: 8202110: (fs) Default file system provider should load UnixNativeDispatcher lazily [v2]

Alan Bateman alanb at openjdk.org
Wed Mar 29 06:56:41 UTC 2023


On Wed, 29 Mar 2023 00:40:08 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Initialize `needToResolveAgainstDefaultDirectory` instance variable lazily thereby deferring early use of `UnixNativeDispatcher` and hopefully loading `libnio`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8202110: Remove undocumented sun.nio.fs.chdirAllowed property and dependent code

The updated version looks to be a good cleanup but there is a orphaned "dir" parameter now. I think the starting point will be UnixFileSystemProvider and WindowsFileSystemProvider where you can drop the lookup of user.dir and then the cleanup will flow from there.

src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java line 81:

> 79:     // package-private
> 80:     UnixFileSystem(UnixFileSystemProvider provider) {
> 81:         String dir = SystemProps.initProperties().get("user.dir");

The original code used `StaticProperty.userDir()`.

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

PR Comment: https://git.openjdk.org/jdk/pull/13132#issuecomment-1488038397
PR Review Comment: https://git.openjdk.org/jdk/pull/13132#discussion_r1151467995


More information about the nio-dev mailing list