Remove hashCode()/equals() from SchemaNode implementations
Most SchemaNode comparisons end up operating on a statement's
SchemaPath, pretending they are equal based on path.
This is not accurate when comparing nodes between SchemaContexts,
as their definition can vary wildly and they cannot be considered
'equal'.
Inter-SchemaContext comparison is all about compatibility and as such
cannot be in terms of equals() contract -- such a compatibility check
is both irreflexive and asymmetric unless the two nodes are completely
compatible.
With the above out of the picture, the definition of comparison
really boils down to a glorified identity check, as SchemaPath is
supposed to be unique for a node.
This patch removes most hashCode()/equals() methods, defaulting to
identity. Notable leftovers are Mandatory/Config statements and
TypeDefinitions (which are DocumentedNodes, but the point is pretty
much the same).
JIRA: YANGTOOLS-761
Change-Id: I8162b2b121f611bc128fbbcea3cef7921f25eb72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
29 files changed: