From aac16db25bbcab0ce59c1a94fe8dc2f2b542430e Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sat, 26 Jan 2002 12:16:46 +0000 Subject: [PATCH] Made loop expression a simple value rather than a complex expression Removing a Audit violation git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270886 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/aut/zip/ZipOutputStream.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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();