Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
The createArchive() method has the following 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();
This looks a bit odd, as the setSize() parameter does not agree with the copy() parameter.