jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <tri...@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 Tue, 15 Oct 2013 18:47:10 GMT

On Tue, Oct 15, 2013 at 11:34 AM, Jukka Zitting <jukka.zitting@gmail.com>wrote:

> Hi,
> On Tue, Oct 15, 2013 at 2:04 PM, Tobias Bocanegra <tripod@apache.org>
> wrote:
> > Initially I thought that comparing just the names would be
> > enough, but then it wouldn't work correctly when a 2 nodetypes of
> different
> > sessions are compared that were modified.
> The Object.equals() contract doesn't require that the compared objects
> are *exactly equal*. Any equivalence relationship, including name
> comparison, should be fine.

Sure, but in this particular case I think that comparing the actual
definition is desired. Imagine a NodeType editor that operates on a session
and wants to list the nodetypes that were modified.

OTOH, in most cases comparing the names should be good enough. If you think
the comparing the CND is overhead, please re-open [0] and I'll change it.
Regards, Toby

[0] https://issues.apache.org/jira/browse/OAK-1086

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message