db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r359145 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java
Date Tue, 27 Dec 2005 00:34:10 GMT
Author: tomdz
Date: Mon Dec 26 16:34:06 2005
New Revision: 359145

URL: http://svn.apache.org/viewcvs?rev=359145&view=rev
Log:
Foreignkey/Index order is not relevant for comparison

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java?rev=359145&r1=359144&r2=359145&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Table.java Mon Dec 26 16:34:06 2005
@@ -18,6 +18,7 @@
 
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Collection;
 
@@ -625,10 +626,10 @@
 
             // Note that this compares case sensitive
             // TODO: For now we ignore catalog and schema (type should be irrelevant anyways)
-            return new EqualsBuilder().append(_name,        other._name)
-                                      .append(_columns,     other._columns)
-                                      .append(_foreignKeys, other._foreignKeys)
-                                      .append(_indices,     other._indices)
+            return new EqualsBuilder().append(_name,                     other._name)
+                                      .append(_columns,                  other._columns)
+                                      .append(new HashSet(_foreignKeys), new HashSet(other._foreignKeys))
+                                      .append(new HashSet(_indices),     new HashSet(other._indices))
                                       .isEquals();
         }
         else
@@ -645,8 +646,8 @@
         // TODO: For now we ignore catalog and schema (type should be irrelevant anyways)
         return new HashCodeBuilder(17, 37).append(_name)
                                           .append(_columns)
-                                          .append(_foreignKeys)
-                                          .append(_indices)
+                                          .append(new HashSet(_foreignKeys))
+                                          .append(new HashSet(_indices))
                                           .toHashCode();
     }
 



Mime
View raw message