diff --git a/proposal/myrmidon/src/java/org/apache/aut/zip/ZipOutputStream.java b/proposal/myrmidon/src/java/org/apache/aut/zip/ZipOutputStream.java index 2bbb64bde..eb9e4e63a 100644 --- a/proposal/myrmidon/src/java/org/apache/aut/zip/ZipOutputStream.java +++ b/proposal/myrmidon/src/java/org/apache/aut/zip/ZipOutputStream.java @@ -33,9 +33,9 @@ import java.util.zip.ZipException; * @author Stefan Bodewig * @version $Revision$ */ -public class ZipOutputStream extends DeflaterOutputStream +public class ZipOutputStream + extends DeflaterOutputStream { - /** * Helper, a 0 as ZipShort. * @@ -371,9 +371,11 @@ public class ZipOutputStream extends DeflaterOutputStream { closeEntry(); cdOffset = new ZipLong( written ); - for( int i = 0; i < entries.size(); i++ ) + final int size = entries.size(); + for( int i = 0; i < size; i++ ) { - writeCentralFileHeader( (ZipEntry)entries.get( i ) ); + final ZipEntry entry = (ZipEntry)entries.get( i ); + writeCentralFileHeader( entry ); } cdLength = new ZipLong( written - cdOffset.getValue() ); writeCentralDirectoryEnd();