donaldp 02/01/26 04:16:46
Modified: proposal/myrmidon/src/java/org/apache/aut/zip
ZipOutputStream.java
Log:
Made loop expression a simple value rather than a complex expression
Removing a Audit violation
Revision Changes Path
1.2 +7 -5
jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/zip/ZipOutputStream.java
Index: ZipOutputStream.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/zip/ZipOutputStream.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ZipOutputStream.java 20 Jan 2002 00:03:04 -0000 1.1
+++ ZipOutputStream.java 26 Jan 2002 12:16:46 -0000 1.2
@@ -31,11 +31,11 @@
* #putNextEntry putNextEntry} will be called.</p>
*
* @author <a href="[EMAIL PROTECTED]">Stefan Bodewig</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
-public class ZipOutputStream extends DeflaterOutputStream
+public class ZipOutputStream
+ extends DeflaterOutputStream
{
-
/**
* Helper, a 0 as ZipShort.
*
@@ -371,9 +371,11 @@
{
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();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>