Uploaded image for project: 'Hippo Repository'
  1. Hippo Repository
  2. REPO-1857

ItemNotFoundException when invoking HippoNode.getDisplayName() for the root node

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.2.2, 5.0.2
    • Fix Version/s: 5.1.0, 5.0.3
    • Labels:
      None
    • Similar issues:
    • Processed by team:
      Platform
    • Sprint:
      Platform 167, Platform 169

      Description

      The HippoNode.getDisplayName() implementation will attempt to determine the node display name via the parent node (recursively) if the current node is not of type hippo:named.

      Which will fail Node.getParent() if the current node is the root node, as calling getParent() then will throw a ItemNotFoundException. 

      Fix should be trivial, e.g. like replacing the current check in org.hippoecm.repository.impl.NodeDecorator.getDisplayName():

      if (!isNodeType(HippoNodeType.NT_NAMED)) {
          Node parent = node.getParent();
      

      with

      if (!isNodeType(HippoNodeType.NT_NAMED)) {
          if (JcrConstants.ROOT_NODE_ID.equals(node.getIdentifier())) {
              return getName();
          }
          Node parent = node.getParent();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                adouma Ate Douma
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: