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

AssertionError thrown for invalid paths

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9
    • Component/s: jcr
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: