jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: svn commit: r1532157 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeTypeEqualsTest.java
Date Wed, 16 Oct 2013 07:22:10 GMT

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 

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).


View raw message