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

Gary D. Gregory updated IO-868:
-------------------------------
    Summary: Document better that a BoundedInputStream builder() can throw 
IOException  (was: BoundedInputStream builder() can throw IOException)

> Document better that a BoundedInputStream builder() can throw IOException
> -------------------------------------------------------------------------
>
>                 Key: IO-868
>                 URL: https://issues.apache.org/jira/browse/IO-868
>             Project: Commons IO
>          Issue Type: Wish
>          Components: Streams/Writers
>            Reporter: Julian Reschke
>            Assignee: Gary D. Gregory
>            Priority: Major
>             Fix For: 2.19.0
>
>
> See
>   
> https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/BoundedInputStream.Builder.html#get()
> This proved to be problematic when removing Guava usage from a project. 
> Guava's constructor for CountingInputStream doesn't declare a checked 
> exception, nor do the constructors of commons-io's CountingInputStream or 
> BoundedInputStream.
> Using the recommended builder however does in the "get()" method. Why?
> This makes it harder to convert existing code that does not expect an 
> exception here. What is the recommendation? Catch and wrap into a 
> RuntimeException?
> Minimally it would good if the Javadoc explained under which condition the 
> IOException could occur.



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

Reply via email to