commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IO-223) IOUtils.copy Javadoc inconsistency (return -1 vs. throw ArithmeticException)
Date Tue, 13 Mar 2012 21:00:40 GMT

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

Sebb updated IO-223:
--------------------

    Fix Version/s: 2.0
    
> 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.3, 1.3.1, 1.3.2, 1.4
>            Reporter: Adam Michalik
>             Fix For: 2.0
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message