RFR 8218875: Add new FileSystems.newFileSystem methods
Lance Andersen
lance.andersen at oracle.com
Wed Feb 20 11:50:05 UTC 2019
Hi Roger,
thank you for your review..
>
> From: nio-dev <nio-dev-bounces at openjdk.java.net <mailto:nio-dev-bounces at openjdk.java.net>> On Behalf Of Roger Riggs
> Sent: Dienstag, 19. Februar 2019 22:15
> To: nio-dev at openjdk.java.net <mailto:nio-dev at openjdk.java.net>
> Subject: Re: RFR 8218875: Add new FileSystems.newFileSystem methods
>
> Hi Lance,
>
> Did you consider alternative method names or signatures that would avoid
> the ambiguity and the necessity of ugly/hacky casts of (ClassLoader)null)?
>
I did consider this and thought of using FileSystems::of. I did not go that way (for now) because
I felt if I did this, I needed to do the same for the newFileSystem methods which take URI and seemed excessive
I went back and read Effective Java naming conventions and I think I talked myself out of using anything other than newFileSystem
Alan and I did exchange email regarding the need for the cast but felt this was a very small edge case and the benefits out-weighed the small compatibility issue.
>
> Perhaps adding a method that has only Path and assumes a null classloader?
> newFileSystem(Path).
>
I could do this if others feel it is worthwhile.
Best
Lance
>
> ??, Roger
>
>
> On 2/19/19 3:54 PM, 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 <http://cr.openjdk.java.net/~lancea/8218875/webrev.00/index.html>
>
> Best
> Lance
> <image001.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/cb95a532/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/cb95a532/oracle_sig_logo-0001.gif>
More information about the nio-dev
mailing list