You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2012/03/30 19:10:55 UTC
svn commit: r1307537 -
/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Author: bodewig
Date: Fri Mar 30 17:10:55 2012
New Revision: 1307537
URL: http://svn.apache.org/viewvc?rev=1307537&view=rev
Log:
make FindBugs happy by iterating over entrySet rather than keySet
Modified:
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java?rev=1307537&r1=1307536&r2=1307537&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java Fri Mar 30 17:10:55 2012
@@ -808,8 +808,9 @@ public class ZipFile {
Map<ZipArchiveEntry, OffsetEntry> origMap =
new LinkedHashMap<ZipArchiveEntry, OffsetEntry>(entries);
entries.clear();
- for (ZipArchiveEntry ze : origMap.keySet()) {
- OffsetEntry offsetEntry = origMap.get(ze);
+ for (Map.Entry<ZipArchiveEntry, OffsetEntry> ent : origMap.entrySet()) {
+ ZipArchiveEntry ze = ent.getKey();
+ OffsetEntry offsetEntry = ent.getValue();
long offset = offsetEntry.headerOffset;
archive.seek(offset + LFH_OFFSET_FOR_FILENAME_LENGTH);
byte[] b = new byte[SHORT];