Julian Reschke created IO-868:
---------------------------------

             Summary: 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


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