Details
Description
testNodeLocked contains:
// get same node Node n2 = (Node) otherSuperuser.getItem(n1.getPath()); // assert: lock token must be null for other session assertNull("Lock token must be null for other session", n2.getLock().getLockToken());
However, the spec says in <http://www.day.com/specs/jcr/2.0/17_Locking.html#17.11.7%20Getting%20Lock%20Tokens>:
"String Lock.getLockToken()
may return the lock token for this lock. If this lock is open-scoped and the current session holds the lock token for this lock, then this method will return that lock token. If the lock is open-scoped and the current session does not hold the lock token, it may return the lock token. Otherwise this method will return null."
...so returning the lock is ok here for open-scoped locks (and this is what oak-jcr does thus fails this test).