"mircea.markus" wrote : move throws an exception if either source or destination
does not exist. This is inconsistent with the rest of the API, as it is the only method
that trows an exception if nodes(s) are inexistent. E.g. removeNode(fqn) will return a
false if the node to be added was not found.
| Here are some suggestions for changing this:
| 1) return a false if either source or destination does not exist (no-op)
| 2) treat it as a remove followed by an put: remove the node (return false if does not
exist) and if destination does not exist create it (put semantics).
| I vote for 1, mainly because 2 is hard to explain to the user
You are correct, although I'd vote for 2. Like removeNode(), move() should return a
success flag, returning false and not doing anything else if the source node does not
exist. It should silently create the destination path if it does not exist just like
put(). Not that hard to explain, we do so with put(). :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158268#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...