Circular loading of installed providers detected
Michael Hall
mik3hall at gmail.com
Wed Sep 29 17:28:24 UTC 2021
I have a FileSystemProvider with something like…
public MacFileSystemProvider() {
List<FileSystemProvider> providers = FileSystemProvider.installedProviders();
for (FileSystemProvider provider : providers) {
To search for the platform ‘file’ scheme provider to set as it’s priorProvider.
I was trying to launch code that apparently attemps to reinstantiate a new no args instance (JShell via API)
getting…
Caused by: java.lang.Error: Circular loading of installed providers detected
at java.base/java.nio.file.spi.FileSystemProvider.installedProviders(Unknown Source)
at us.hall.trz.osx.MacFileSystemProvider.<init>(MacFileSystemProvider.java:41)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
…
This isn’t really circular it is just being done a second time.
Should it be up to installedProviders() to know it has already been done and return what it already loaded?
Or should my code handle this probably by changing it’s saved priorProvider to static and not trying to set it again if it is not null?
More information about the nio-dev
mailing list