You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jm...@apache.org on 2005/01/07 20:18:03 UTC
cvs commit: jakarta-commons/chain/src/java/org/apache/commons/chain/generic CopyCommand.java
jmitchell 2005/01/07 11:18:03
Modified: chain/src/java/org/apache/commons/chain/generic
CopyCommand.java
Log:
Fix for bug 32894
Revision Changes Path
1.8 +12 -9 jakarta-commons/chain/src/java/org/apache/commons/chain/generic/CopyCommand.java
Index: CopyCommand.java
===================================================================
RCS file: /home/cvs/jakarta-commons/chain/src/java/org/apache/commons/chain/generic/CopyCommand.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CopyCommand.java 25 Feb 2004 00:01:07 -0000 1.7
+++ CopyCommand.java 7 Jan 2005 19:18:03 -0000 1.8
@@ -122,16 +122,19 @@
*/
public boolean execute(Context context) throws Exception {
- Object value = this.value;
+ Object value = this.value;
+
if (value == null) {
- context.get(getFromKey());
+ value = context.get(getFromKey());
}
- if (value != null) {
- context.put(getToKey(), value);
- } else {
- context.remove(getToKey());
- }
- return (false);
+
+ if (value != null) {
+ context.put(getToKey(), value);
+ } else {
+ context.remove(getToKey());
+ }
+
+ return (false);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org