Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD04B993A for ; Tue, 13 Mar 2012 21:01:03 +0000 (UTC) Received: (qmail 42415 invoked by uid 500); 13 Mar 2012 21:01:03 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 42321 invoked by uid 500); 13 Mar 2012 21:01:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 42313 invoked by uid 99); 13 Mar 2012 21:01:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 21:01:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 21:01:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4DF811EF7A for ; Tue, 13 Mar 2012 21:00:40 +0000 (UTC) Date: Tue, 13 Mar 2012 21:00:40 +0000 (UTC) From: "Sebb (Updated) (JIRA)" To: issues@commons.apache.org Message-ID: <112681057.9481.1331672440359.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (IO-223) IOUtils.copy Javadoc inconsistency (return -1 vs. throw ArithmeticException) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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