Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-2967

SessionItemStateManager.getIdOfRootTransientNodeState() may cause NPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.0.3, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.2, 2.2.1, 2.2.2, 2.2.4, 2.2.5
    • Fix Version/s: 2.0.5, 2.1.6, 2.2.9
    • Component/s: jackrabbit-core
    • Labels:
      None

      Description

      regression of JCR-2425

      in certain scenarios, calling SessionItemStateManager.getIdOfRootTransientNodeState() may cause a NPE.

      Test case:

      Repository repository = new TransientRepository();
      Session session = repository.login(
      new SimpleCredentials("admin", "admin".toCharArray()));
      Session session2 = repository.login(
      new SimpleCredentials("admin", "admin".toCharArray()));

      try {
      while (session.getRootNode().hasNode("test"))

      { session.getRootNode().getNode("test").remove(); }


      Node test = session.getRootNode().addNode("test");
      session.save();
      Node x = test.addNode("x");
      session.save();

      Node x2 = session2.getRootNode().getNode("test").getNode("x");
      x2.remove();
      x.addNode("b");
      session2.save();
      session.save(); // throws NPE
      } finally

      { session.logout(); session2.logout(); }

        Activity

        Hide
        Stefan Guggisberg added a comment -

        fixed in svn r1101046

        Show
        Stefan Guggisberg added a comment - fixed in svn r1101046
        Hide
        Jukka Zitting added a comment -

        Merged to the 2.2 branch in revision 1174762, to 2.1 in 1174764, and to 2.0 in 1174772.

        Show
        Jukka Zitting added a comment - Merged to the 2.2 branch in revision 1174762, to 2.1 in 1174764, and to 2.0 in 1174772.

          People

          • Assignee:
            Stefan Guggisberg
            Reporter:
            Stefan Guggisberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development