jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1397531 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/value/ValueImpl.java
Date Fri, 12 Oct 2012 12:09:40 GMT
Author: mduerig
Date: Fri Oct 12 12:09:40 2012
New Revision: 1397531

URL: http://svn.apache.org/viewvc?rev=1397531&view=rev
Log:
OAK-350: Unify PropertyState and CoreValue
correct hash code

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/value/ValueImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/value/ValueImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/value/ValueImpl.java?rev=1397531&r1=1397530&r2=1397531&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/value/ValueImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/value/ValueImpl.java
Fri Oct 12 12:09:40 2012
@@ -277,7 +277,12 @@ public class ValueImpl implements Value 
      */
     @Override
     public int hashCode() {
-        return propertyState.hashCode();
+        if (getType() == PropertyType.BINARY) {
+            return propertyState.getValue(Type.BINARY, index).hashCode();
+        }
+        else {
+            return propertyState.getValue(Type.STRING, index).hashCode();
+        }
     }
 
     @Override



Mime
View raw message