[jsword-svn] r1283 - trunk/jsword/src/main/java/org/crosswire/jsword/passage

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Fri Apr 20 10:32:41 MST 2007


Author: dmsmith
Date: 2007-04-20 10:32:41 -0700 (Fri, 20 Apr 2007)
New Revision: 1283

Modified:
   trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultLeafKeyList.java
Log:
fixed hashCode/equals bug in DefaultLeafKeyList

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultLeafKeyList.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultLeafKeyList.java	2007-04-20 17:29:37 UTC (rev 1282)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/DefaultLeafKeyList.java	2007-04-20 17:32:41 UTC (rev 1283)
@@ -216,6 +216,11 @@
      */
     public boolean equals(Object obj)
     {
+        if (this == obj)
+        {
+            return true;
+        }
+
         // Since this can not be null
         if (obj == null)
         {
@@ -234,7 +239,7 @@
 
         // The real bit ...
         DefaultLeafKeyList that = (DefaultLeafKeyList) obj;
-        return name.equals(that.name) && osisName.equals(that.osisName);
+        return name.equals(that.name);
     }
 
     /* (non-Javadoc)
@@ -245,6 +250,7 @@
         return name.hashCode();
     }
 
+
     /* (non-Javadoc)
      * @see java.lang.Comparable#compareTo(java.lang.Object)
      */




More information about the jsword-svn mailing list