Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
32894
Description
CopyCommand appears to only work if the setValue method is run. The
documentation says "... a context attribute stored under the fromKey (if any),
to the toKey". If only the fromKey and toKey are set, the toKey and its stored
value are deleted from the Context regardless of fromKey's value. This should
only happen if the fromKey value is null.
In the execute method of CopyCommand, it appears that
if (value == null)
should read
if (value == null)
{ value = context.get(getFromKey()); }then the rest of the code should function as expected:
if (value != null)
{ context.put(getToKey(), value); }else
{ context.remove(getToKey()); }return (false);