Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1857

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 4.2.2, 5.0.2
    • 5.1.0, 5.0.3
    • None
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: