Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1799

can't move node under root

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 3.1.2.Final, 3.2.0.Final
    • 3.1.1.Final
    • JCR
    • None

      Executing org.modeshape.jcr.JcrSession.move("/test1", "/test2"), in a in memory repository, throw exception caused by: javax.jcr.ItemNotFoundException
      at org.modeshape.jcr.JcrRootNode.getParent(JcrRootNode.java:88)
      at org.modeshape.jcr.JcrSession.move(JcrSession.java:946)

      I'm a newbie of modeshape so I don't know if it's the desired behavior, but to fix is sufficient to check if the node is the root before call getParent().

      destAncestor = !destAncestor.isRoot() ? destAncestor.getParent() : destAncestor;

              hchiorean Horia Chiorean (Inactive)
              noah79 noah totti (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: