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 "Michael Dürig (JIRA)" <ji...@apache.org> on 2013/08/27 12:10:53 UTC

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

     [ https://issues.apache.org/jira/browse/OAK-978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dürig resolved OAK-978.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9
         Assignee: Michael Dürig

Fixed at http://svn.apache.org/r1517773
                
> 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
>            Assignee: Michael Dürig
>            Priority: Minor
>             Fix For: 0.9
>
>
> 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