RFR 8218875: Add new FileSystems.newFileSystem methods
Lance Andersen
lance.andersen at oracle.com
Wed Feb 20 11:54:46 UTC 2019
Hi Christoph,
Thank you for the review
> On Feb 20, 2019, at 5:23 AM, Langer, Christoph <christoph.langer at sap.com> wrote:
>
> Hi Lance,
>
> first of all, thanks for taking this. I also lately wondered about why there wasn’t the same set of newFileSystem methods in FileSystems that would take a Path compared to those that work on a URI. I was about to ask this on the mailing list.
timing is everything :-)
>
> It’s really too bad that there is this method with signature newFileSystem(Path path, ClassLoader loader) when it rather should have been newFileSystem(Path path, Map<String,?> env, ClassLoader loader) to mirror the API using the URI.
>
> I think we should not become source incompatible. So what about spending a set of 3 methods that are named FileSystems::of that take a Path? And in any case, deprecate “newFileSystem(Path path, ClassLoader loader)”.
>
Please see my response to Roger’s similar question.
I am not opposed to going with Filesystems::of, just think we would need to do it for all of the existing methods. It seems to add some extra bloat. So I think the question is whether the extra bloat is worth it vs. the small compatibility issue
> I assume you’ll open a CSR for that change once it’s a bit clearer on where we’re going with it?
Yes, that is the plan
>
> Thanks
> Christoph
>
> 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)?
>
> Perhaps adding a method that has only Path and assumes a null classloader?
> newFileSystem(Path).
>
> ??, 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/8ec3536c/attachment.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/8ec3536c/oracle_sig_logo.gif>
More information about the nio-dev
mailing list