/** Tries to prevent issue 46993 by checking whether a node * to be set as original is actually pointing to this node. * @exception IllegalArgumentException if the check fails * @return always true */ private boolean checkIfIamAccessibleFromOriginal(Node original) { if (this == original) { throw new IllegalArgumentException("Node cannot be its own original (even thru indirect chain)"); // NOI18N } if (original instanceof FilterNode) { FilterNode f = (FilterNode) original; checkIfIamAccessibleFromOriginal(f.original); } return true; }
/** Tries to prevent issue 46993 by checking whether a node * to be set as original is actually pointing to this node. * @exception IllegalArgumentException if the check fails * @return always true */ private boolean checkIfIamAccessibleFromOriginal (Node original) { if (this == original) { throw new IllegalArgumentException ("Node cannot be its own original (even thru indirect chain)"); // NOI18N } if (original instanceof FilterNode) { FilterNode f = (FilterNode)original; checkIfIamAccessibleFromOriginal (f.original); } return true; }
/** Tries to prevent issue 46993 by checking whether a node * to be set as original is actually pointing to this node. * @exception IllegalArgumentException if the check fails * @return always true */ private boolean checkIfIamAccessibleFromOriginal (Node original) { if (this == original) { throw new IllegalArgumentException ("Node cannot be its own original (even thru indirect chain)"); // NOI18N } if (original instanceof FilterNode) { FilterNode f = (FilterNode)original; checkIfIamAccessibleFromOriginal (f.original); } return true; }
assert checkIfIamAccessibleFromOriginal(original) : ""; // NOI18N
assert checkIfIamAccessibleFromOriginal (original) : ""; // NOI18N
assert checkIfIamAccessibleFromOriginal (original) : ""; // NOI18N