Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-753

TreeImpl exposes hidden child trees

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9
    • core
    • None

    Description

      while we are having an extra test to prevent hidden property states
      from being exposed on the oak-api, we forgot to add the same check for
      child trees.

      while adding the test is pretty straight forward it would have an impact
      not only on #getChild(String) but also on

      • #getChildren
      • #getChildrenCount
      • #getOrderedChildNames
      • ...

      the simple check without addressing the other methods (already taking OAK-709 into account):

      private boolean canRead(TreeImpl tree) {
              return tree.getNodeState().exists() && !NodeStateUtils.isHidden(tree.getName());
          }
      

      adding this test will cause the following tests to fail

      • o.a.j.test.nodetype.NodeTypeTest#testGetPrimaryItemName which traverses the
        repository instead of using a configured node type to setup an appropriate test and fails with the short-cut for childcnt being 1 in NodeDelegate
      • TypeEditorTest#ignoreHidden which tries to create hidden nodes using
        the oak api (see also OAK-695)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              angela Angela Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: