While looking at this for some other bug, I found some issues with this fix. For example, if i create three nested nodes (eg. hello/world/jackrabbit) like this:
Node root = session.getRootNode();
Node hello = root.addNode("hello");
Node world = hello.addNode("world");
Node jackrabbit = world.addNode("jackrabbit");
I see the following in the logs for the three saves:
revision 1 admin@
revision 2 admin@
revision 3 admin@/hello
The problem with this is:
1- Not sure what "admin@" means. I think this should be "admin@ / " to signify that something is written to the root.
2- Even though "world" node was added under "hello" node, it shows up as being added to root in revision 2.
3- Even though "jackrabbit" node was added under "world" node, it shows up as being added to "hello" node in revision 3.
I think the logs should look like this:
revision 1 admin@/
revision 2 admin@/hello
revision 3 admin@/hello/world