Replacing default FileSystemProvider

Alan Bateman Alan.Bateman at oracle.com
Sat Mar 20 07:48:20 UTC 2021


On 19/03/2021 21:09, Michael Hall wrote:
> :
>
> I had hoped for something obvious I missed.
>
> If it will require looking into the complete simple test case is here…
>
> http://mikehall.pairserver.com/testfsp.zip 
> <http://mikehall.pairserver.com/testfsp.zip>
>
The default file system provider is called to create the default file 
system so your TestProvider's getFileSystem(URI) method is invoked to 
create the "file:///" file system. It looks like your TestProvider is 
returning null so I assume this is why you are seeing NPE (assuming 
TestProvider is representative of the actual file system provider you 
are using). There is more detail on the javadoc of FileSystem.getDefault().

One of your mails mentions that you have a replacement for 
com.apple.eio.FileManager. Can you say more about this? Are you the 
submitter of JDK-8187981[1] ? That issue is looking for improve 
macOS/desktop integration but it pre-dates several APIs on 
java.awt.Desktop and other features, maybe it can be closed?

-Alan.

[1] https://bugs.openjdk.java.net/browse/JDK-8187981


More information about the nio-dev mailing list