Issue Details (XML | Word | Printable)

Key: CHAIN-6
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: William Slough
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Chain

[chain] CopyCommand does not work unless setValue is called

Created: 31/Dec/04 03:05 AM   Updated: 02/Jan/08 07:01 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File CopyCommand.patch 2005-01-01 04:19 AM sean schofield 0.9 kB
Environment:
Operating System: All
Platform: All

Bugzilla Id: 32894


 Description  « Hide
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) { context.get(getFromKey()); }

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



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.