commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1163745 - /commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
Date Wed, 31 Aug 2011 19:04:49 GMT
Author: simonetripodi
Date: Wed Aug 31 19:04:48 2011
New Revision: 1163745

URL: http://svn.apache.org/viewvc?rev=1163745&view=rev
Log:
used collections method to add commands from an existing collection

Modified:
    commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java

Modified: commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java?rev=1163745&r1=1163744&r2=1163745&view=diff
==============================================================================
--- commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
(original)
+++ commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
Wed Aug 31 19:04:48 2011
@@ -104,10 +104,7 @@ public class ChainBase<C extends Context
         if (commands == null) {
             throw new IllegalArgumentException();
         }
-        Iterator<Command<C>> elements = commands.iterator();
-        while (elements.hasNext()) {
-            addCommand(elements.next());
-        }
+        this.commands.addAll( commands );
 
     }
 



Mime
View raw message