jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r123964 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
Date Mon, 03 Jan 2005 13:21:08 GMT
Author: stefan
Date: Mon Jan  3 05:21:07 2005
New Revision: 123964

URL: http://svn.apache.org/viewcvs?view=rev&rev=123964
Log:
fixed issue JCR-35: NodeTypeDefDiff compares to restrictive
http://issues.apache.org/jira/browse/JCR-35

NodeTypeDef did not override 'equals' method

Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java?view=diff&rev=123964&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java&r1=123963&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java&r2=123964
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ChildNodeDef.java
Mon Jan  3 05:21:07 2005
@@ -42,7 +42,7 @@
         if (obj instanceof ChildNodeDef) {
             ChildNodeDef other = (ChildNodeDef) obj;
             return super.equals(obj)
-                    && Arrays.equals(requiredPrimaryTypes, requiredPrimaryTypes)
+                    && Arrays.equals(requiredPrimaryTypes, other.requiredPrimaryTypes)
                     && (defaultPrimaryType == null ? other.defaultPrimaryType ==
null : defaultPrimaryType.equals(other.defaultPrimaryType))
                     && allowSameNameSibs == other.allowSameNameSibs;
         }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java?view=diff&rev=123964&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java&r1=123963&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java&r2=123964
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeDef.java
Mon Jan  3 05:21:07 2005
@@ -22,6 +22,7 @@
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
+import java.util.Arrays;
 
 /**
  * A <code>NodeTypeDef</code> holds the definition of a node type.
@@ -55,6 +56,22 @@
         // clear dependencies (will be lazily built)
         clone.resetDependencies();
         return clone;
+    }
+
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof NodeTypeDef) {
+            NodeTypeDef other = (NodeTypeDef) obj;
+            return (name == null ? other.name == null : name.equals(other.name))
+                    && Arrays.equals(supertypes, other.supertypes)
+                    && mixin == other.mixin
+                    && orderableChildNodes == other.orderableChildNodes
+                    && Arrays.equals(propDefs, other.propDefs)
+                    && Arrays.equals(nodeDefs, other.nodeDefs);
+        }
+        return false;
     }
 
     /**

Mime
View raw message