Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
I'm trying to use MockNode of hippo-repository-testutils. It throws an
exception when adding SNS child. I see the following in MockNode.java:
public void addNode(MockNode child) {
child.setParent(this);
String childName = child.getName();
if (children.containsKey(childName))
children.put(childName, child);
}
This doesn't look quite right to me. I think we should allow to add SNS
in MockNode by default and we'd better add methods like
MockNode#setSameNameSiblingSupported() and
MockNode#isSameNameSiblingSupported(). Also, static methods can be useful:
e.g, MockNode#setDefaultSameNameSiblingSupported() and
#isDefaultSameNameSiblingSupported().