enapps-enorman opened a new pull request, #12:
URL: https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/12

   The MockNode#orderBefore implementation is using a simple "startsWith" check 
on path strings to find the items to move.  This will match too many items if 
the sibling nodes have names with a common prefix.
   
   For example, for the following scenario child10 should be ordered before 
child100, but what actually happens is both child10 and child100 get removed 
from the parent.
   
   Node foo = this.session.getRootNode().addNode("foo");
   foo.addNode("child100");
   foo.addNode("child10");
   foo.addNode("child1");
   foo.orderBefore("child10", "child100"); 
   
   Expected:
   The "find all items matching the source" logic in MockSession#orderBefore 
should be changed to match paths that equal the source path exactly or starts 
with the source path with a trailing slash.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to