On 15.10.13 8:04 , Tobias Bocanegra wrote:
I think the semantics of NodeType.equals() should be mentioned in the JCR
API. I'm indifferent if we should consider the comparison between 2
different implementations.

The symmetry requirement comes from the general contract of equals and we can't specify this away. Its a tough requirement to get right across inheritance. That's why I'd prefer to not take inheritance into account and simply return false for NodeType.equals() between different implementations.

The current implementation would still return true for n.equals(m) but might return false for m.equals(n) if getCnd(m).equals(getCnd(n)) and n instanceOf NodeTypeImpl and !(m instanceOf NodeTypeImpl).

Michael

Reply via email to