Description
If the Oak is run with assertions enabled (-ea VM flag) then it throws AssertionError instead of javax.jcr.RepositoryException
@Test public void testExceptionThrownForInvalidPath() throws RepositoryException { Session session = getAdminSession(); session.itemExists("//jcr:content"); }
Above code has following behaviour
- In JR2 - javax.jcr.RepositoryException: Invalid path://jcr:content
- In Oak with -ea - java.lang.AssertionError
- In Oak without -ea - Returns false.
For compatibility and also as per spec it should throw RepositoryException