Author: vgritsenko
Date: Sun Sep  2 03:48:02 2007
New Revision: 571943

URL: http://svn.apache.org/viewvc?rev=571943&view=rev
Log:
there is a test saying that key.equals(value) should work.

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/core/data/Key.java
    xml/xindice/trunk/java/src/org/apache/xindice/core/data/Value.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/data/Key.java
URL: 
http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/data/Key.java?rev=571943&r1=571942&r2=571943&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/data/Key.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/data/Key.java Sun Sep  2 
03:48:02 2007
@@ -42,16 +42,7 @@
         super(data);
     }
 
-    public int getHash() {
-        return super.hashCode();
-    }
-
     public boolean equals(Value value) {
-        //noinspection SimplifiableIfStatement
-        if (value instanceof Key) {
-            return hashCode() == value.hashCode() && compareTo(value) == 0;
-        }
-
-        return false;
+        return hashCode() == value.hashCode() && compareTo(value) == 0;
     }
 }

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/data/Value.java
URL: 
http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/data/Value.java?rev=571943&r1=571942&r2=571943&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/data/Value.java 
(original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/data/Value.java Sun Sep  
2 03:48:02 2007
@@ -36,9 +36,9 @@
  */
 public class Value implements Comparable {
 
-    private byte[] data;
-    private int pos;
-    private int len;
+    private final byte[] data;
+    private final int pos;
+    private final int len;
     private int hash;
 
     /**


Reply via email to