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 );
}