Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
the AbstractTree.getChildrenCount() does unnecessary checks for hidden names:
long count = nodeBuilder.getChildNodeCount(max); for (String name : INTERNAL_NODE_NAMES) { if (nodeBuilder.hasChildNode(name)) { count--; } }
this is not optimal, especially because the nodebuilder creates child builders:
public boolean hasChildNode(@Nonnull String name) { return getChildNode(name).exists(); }
Suggest: to extend the NodeBuilder.getChildNodeCount() method to accept an additional flag if to include hidden nodes or not.
Attachments
Issue Links
- relates to
-
OAK-1173 NPE if checking for a non-existing node in version storage
- Closed