Jackrabbit Oak
  1. Jackrabbit Oak
  2. OAK-978

AssertionError thrown for invalid paths

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development