RFR 8218875: Add new FileSystems.newFileSystem methods

Lance Andersen lance.andersen at oracle.com
Wed Feb 20 11:57:17 UTC 2019


Hi Daniel,

Thank you for the review
> On Feb 20, 2019, at 5:53 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> 
> 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 can do that, same needs done for the URI version of this method
> 
> 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.

I can also do that and as above, needs done for the URI version of this method

Best
Lance
> 
> 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>
> 

 <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>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190220/a2f11f71/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190220/a2f11f71/oracle_sig_logo-0001.gif>


More information about the nio-dev mailing list