You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2013/08/27 10:05:51 UTC

[jira] [Created] (OAK-978) Compatibility - AssertionError thrown for invalid paths

Chetan Mehrotra created OAK-978:
-----------------------------------

             Summary: Compatibility - AssertionError thrown for invalid paths
                 Key: OAK-978
                 URL: https://issues.apache.org/jira/browse/OAK-978
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: jcr
            Reporter: Chetan Mehrotra
            Priority: Minor


If the Oak is run with assertions enabled (-ea VM flag) then it throws {{AssertionError}} instead of {{javax.jcr.RepositoryException}}

{code:java}
    @Test
    public void testExceptionThrownForInvalidPath() throws RepositoryException {
        Session session = getAdminSession();

        session.itemExists("//jcr:content");
    }
{code}

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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira