8242292: java.nio.file.FileSystems.getFileSystem(URI) should throw IAE if the URI's scheme is null

Lance Andersen lance.andersen at oracle.com
Tue Apr 7 18:40:55 UTC 2020


+1

> On Apr 7, 2020, at 2:33 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> 
> Please review the change included below to address [1] in hope of shedding some light on [2].
> 
> Thanks,
> 
> Brian
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8242292 <https://bugs.openjdk.java.net/browse/JDK-8242292>
> [2] https://bugs.openjdk.java.net/browse/JDK-8239569
> 
> 
> @@ -226,6 +226,9 @@
>       */
>      public static FileSystem getFileSystem(URI uri) {
>          String scheme = uri.getScheme();
> +        if (scheme == null) {
> +            throw new IllegalArgumentException(uri.toString());
> +        }
>          for (FileSystemProvider provider: FileSystemProvider.installedProviders()) {
> 

 <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/20200407/b5f0c02f/attachment-0001.htm>
-------------- 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/20200407/b5f0c02f/oracle_sig_logo-0001.gif>


More information about the nio-dev mailing list