Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 77566 invoked from network); 4 Mar 2009 13:46:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2009 13:46:22 -0000 Received: (qmail 77371 invoked by uid 500); 4 Mar 2009 13:46:20 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 77313 invoked by uid 500); 4 Mar 2009 13:46:20 -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 77302 invoked by uid 99); 4 Mar 2009 13:46:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 05:46:20 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 13:46:17 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6191E234C4B5 for ; Wed, 4 Mar 2009 05:45:56 -0800 (PST) Message-ID: <361861503.1236174356398.JavaMail.jira@brutus> Date: Wed, 4 Mar 2009 05:45:56 -0800 (PST) From: "Sebb (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (SANDBOX-297) AbstractTestCase.createArchive method appears to use incorrect file size - cut and paste error? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org AbstractTestCase.createArchive method appears to use incorrect file size - cut and paste error? ----------------------------------------------------------------------------------------------- Key: SANDBOX-297 URL: https://issues.apache.org/jira/browse/SANDBOX-297 Project: Commons Sandbox Issue Type: Bug Components: Compress Reporter: Sebb Priority: Minor The createArchive() method has the following code: {code} ZipArchiveEntry entry = new ZipArchiveEntry("testdata/test1.xml"); entry.setSize(file1.length()); out.putArchiveEntry(entry); IOUtils.copy(new FileInputStream(file1), out); out.closeArchiveEntry(); entry = new ZipArchiveEntry("testdata/test2.xml"); entry.setSize(file1.length()); // <== should this be file2.length? out.putArchiveEntry(entry); IOUtils.copy(new FileInputStream(file2), out); out.closeArchiveEntry(); {code} This looks a bit odd, as the setSize() parameter does not agree with the copy() parameter. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.