commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1307537 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Date Fri, 30 Mar 2012 17:10:55 GMT
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];



Mime
View raw message