Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-978

AssertionError thrown for invalid paths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9
    • jcr
    • None

    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

      Attachments

        Activity

          People

            mduerig Michael Dürig
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: