Description
In case you call node.orderBefore("nodeName", "nodeName"), oak throws
IllegalArgumentException with message "limit is negative"
While you may reason that is a wrong useage the spec is explicit about the expected behavior.
If this node supports child node ordering, this method inserts the child node at srcChildRelPath into the child node list at the position immediately the child node at destChildRelPath. To place the node srcChildRelPath at the end of the list, a destChildRelPath of null is used. Note that (apart from the case where destChildRelPath is null) both of these arguments must be relative paths of depth one, in other words they are the names of the child nodes, possibly suffixed with an index. If srcChildRelPath and destChildRelPath are the same, then no change is made. This is session-write method, meaning that a change made by this method is dispatched on save