You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Christian Grobmeier <gr...@gmail.com> on 2009/03/12 07:37:12 UTC
Re: [jira] Created: (SANDBOX-297) AbstractTestCase.createArchive
method appears to use incorrect file size - cut and paste error?
Patch for this is now attached to Jira. If somebody has some time left.. :-)
Cheers,
Christian
On Wed, Mar 4, 2009 at 2:45 PM, Sebb (JIRA) <ji...@apache.org> wrote:
> 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.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org