servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bsny...@apache.org
Subject svn commit: r593358 - /incubator/servicemix/branches/servicemix-4.0/jbi/offline/src/main/java/org/apache/servicemix/offline/JarUtil.java
Date Thu, 08 Nov 2007 23:39:15 GMT
Author: bsnyder
Date: Thu Nov  8 15:39:12 2007
New Revision: 593358

URL: http://svn.apache.org/viewvc?rev=593358&view=rev
Log:
Changed the for loops to the new syntax.

Modified:
    incubator/servicemix/branches/servicemix-4.0/jbi/offline/src/main/java/org/apache/servicemix/offline/JarUtil.java

Modified: incubator/servicemix/branches/servicemix-4.0/jbi/offline/src/main/java/org/apache/servicemix/offline/JarUtil.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/jbi/offline/src/main/java/org/apache/servicemix/offline/JarUtil.java?rev=593358&r1=593357&r2=593358&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/jbi/offline/src/main/java/org/apache/servicemix/offline/JarUtil.java
(original)
+++ incubator/servicemix/branches/servicemix-4.0/jbi/offline/src/main/java/org/apache/servicemix/offline/JarUtil.java
Thu Nov  8 15:39:12 2007
@@ -1,11 +1,7 @@
 package org.apache.servicemix.offline;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.jar.Attributes;
-import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 
 import org.springframework.core.io.Resource;
@@ -24,15 +20,15 @@
         StringBuffer content = new StringBuffer();
         final String indent = " "; 
         
-        Map entries = manifest.getEntries();
+        Map<String, Attributes> entries = manifest.getEntries();
         
-        for (Iterator iter0 = (Iterator) entries.keySet().iterator(); iter0.hasNext();) {
-            String entryName = (String) iter0.next();
+        for (String string : entries.keySet()) {
+            String entryName = (String) string;
             content.append(entryName);
             Attributes attrs = (Attributes) entries.get(entryName);
             
-            for (Iterator iter1 = (Iterator) attrs.keySet().iterator(); iter1.hasNext();)
{
-                Attributes.Name name = (Attributes.Name) iter1.next();
+            for (Object element : attrs.keySet()) {
+                Attributes.Name name = (Attributes.Name) element;
                 String attr = attrs.getValue(name);
                 content.append(indent + attr);
             }



Mime
View raw message