[ 
https://issues.apache.org/jira/browse/IO-831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory resolved IO-831.
--------------------------------
    Fix Version/s: 2.16.2
       Resolution: Fixed

> Add getInputStream() for 'https' & 'http' in URIOrigin
> ------------------------------------------------------
>
>                 Key: IO-831
>                 URL: https://issues.apache.org/jira/browse/IO-831
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Elliotte Rusty Harold
>            Priority: Major
>             Fix For: 2.16.2
>
>
> I think file URLs might work but http/https URLs, much more common, don't. 
> I'm not yet sure if this can be fixed without changing the API.
>     @Test
>     public void testReadFromURL() throws URISyntaxException, IOException {
>         final URIOrigin origin = new URIOrigin(new 
> URI("https://www.yahoo.com";));
>         try (final InputStream in = origin.getInputStream()) {
>             assertNotEquals(-1, in.read());
>         }
>     }
> java.nio.file.FileSystemNotFoundException: Provider "https" not installed
>       at java.nio.file.Paths.get(Paths.java:147)
>       at 
> org.apache.commons.io.build.AbstractOrigin$URIOrigin.getPath(AbstractOrigin.java:402)
>       at 
> org.apache.commons.io.build.AbstractOrigin.getInputStream(AbstractOrigin.java:540)
>       at 
> org.apache.commons.io.build.URIOriginTest.testReadFromURL(URIOriginTest.java:47)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at java.util.ArrayList.forEach(ArrayList.java:1257)
>       at java.util.ArrayList.forEach(ArrayList.java:1257)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to