commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1496627 - /commons/proper/chain/trunk/base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
Date Tue, 25 Jun 2013 20:19:29 GMT
Author: britter
Date: Tue Jun 25 20:19:29 2013
New Revision: 1496627

URL: http://svn.apache.org/r1496627
Log:
Use enhanced for loop

Modified:
    commons/proper/chain/trunk/base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java

Modified: commons/proper/chain/trunk/base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java?rev=1496627&r1=1496626&r2=1496627&view=diff
==============================================================================
--- commons/proper/chain/trunk/base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
(original)
+++ commons/proper/chain/trunk/base/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
Tue Jun 25 20:19:29 2013
@@ -439,15 +439,15 @@ public class ContextBase extends Context
         }
 
         // Initialize the underlying Map contents
-        for (int i = 0; i < pd.length; i++) {
-            String name = pd[i].getName();
+        for (PropertyDescriptor propertyDescriptor : pd) {
+            String name = propertyDescriptor.getName();
 
             // Add descriptor (ignoring getClass() and isEmpty())
             if (!("class".equals(name) || "empty".equals(name))) {
                 if (descriptors == null) {
                     descriptors = new HashMap<String, PropertyDescriptor>(pd.length
- 2);
                 }
-                descriptors.put(name, pd[i]);
+                descriptors.put(name, propertyDescriptor);
                 super.put(name, singleton);
             }
         }



Mime
View raw message