commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Michalik (JIRA)" <j...@apache.org>
Subject [jira] Created: (IO-223) IOUtils.copy Javadoc inconsistency (return -1 vs. throw ArithmeticException)
Date Tue, 17 Nov 2009 09:32:39 GMT
IOUtils.copy Javadoc inconsistency (return -1 vs. throw ArithmeticException)
----------------------------------------------------------------------------

                 Key: IO-223
                 URL: https://issues.apache.org/jira/browse/IO-223
             Project: Commons IO
          Issue Type: Bug
          Components: Utilities
    Affects Versions: 1.4, 1.3.2, 1.3.1, 1.3
            Reporter: Adam Michalik


The javadoc for IOUtils.copy says:
"Large streams (over 2GB) will return a bytes copied value of -1 after the copy has completed
since the correct number of bytes cannot be returned as an int."
but then it says:
"Throws:
ArithmeticException - if the byte count is too large"
This is an inconsistency since -1 is always returned if the byte count is too large. ArithmeticException
is never actually thrown.

See IO-84 for discussion on solving the "too large byte count" problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message