FileSystemProvider.getFileSystem() handling of IOException thrown by newFileSystem()?
Vince Bonfanti
vbonfanti at gmail.com
Sun Aug 23 17:34:22 PDT 2009
The JavaDocs for java.nio.file.spi.FileSystemProvider
(http://java.sun.com/javase/7/docs/api/java/nio/file/spi/FileSystemProvider.html)
make it clear that getFileSystem() is supposed to invoke
newFileSystem() to create a new FileSystem instance,
but...newFileSystem() declares that it throws IOException, but
getFileSystem() does not declare any thrown exceptions (all of the
exceptions listed in the JavaDocs are subclasses of RuntimeException).
What is getFileSystem() supposed to do if newFileSystem() throws an
IOException? Wrap the IOException in a RuntimeException and rethrow
it? return null? something else?
Is there any documentation available for authors of file system
providers other than the JavaDocs and resources listed on the project
web site (http://openjdk.java.net/projects/nio/)?
Thanks.
More information about the nio-discuss
mailing list