In the Java 7 source code the class, Paths has a method – get(URI).
Within get(URI) exists:
return FileSystems.getDefault().provider().getPath(uri);
FileSystems.getDefault() returns a reference to the default filesystem. But then, according to the docs, .provider() closes the file system and then .getPath(uri) is called. Could someone explain to me what is going on? Why does the file system seem to be closed and then returned?
It would be great if someone could give me the blow-by-blow on what is occurring in that return statement.
i think this is the line you are referring to:
That does not mean the provider closes the system. It is talking about how the provider handles things when the system gets closed. Which would happen at some later time.