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 alsoOAK-695)