RFR 8218875: Add new FileSystems.newFileSystem methods
Daniel Fuchs
daniel.fuchs at oracle.com
Wed Feb 20 10:53:35 UTC 2019
Hi Lance,
FileSystems.java:
481 public static FileSystem newFileSystem(Path path,
Map<String,?> env,
482 ClassLoader loader)
483 throws IOException
484 {
The javadoc says that env may be empty - which implies
it shouldn't be null. I'd suggest adding an explicit null
check here rather than leaving it up to the provider.
I'd also suggest to make a defensive copy of the env Map,
e.g. using Map.copyOf, before passing it to any provider.
We don't want provider's code to start depending on any
particular implementation of Map.
best regards,
-- daniel
On 19/02/2019 20:54, Lance Andersen wrote:
> Hi all,
>
> Please review the update to Filesystems which adds the methods:
>
> newFileSystem(Path, Map<String,?>) and newFileSystem(Path,
> Map<String,?>, ClassLoader).
>
> These methods are being added to provide better support for working with
> the Zip File System.
>
> The webrev can be found at:
> http://cr.openjdk.java.net/~lancea/8218875/webrev.00/index.html
>
> Best
> Lance
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif><http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen|
> Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
>
>
>
More information about the nio-dev
mailing list