You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2013/01/10 11:35:59 UTC

svn commit: r1431264 - in /incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core: Triple.java impl/TripleImpl.java

Author: reto
Date: Thu Jan 10 10:35:58 2013
New Revision: 1431264

URL: http://svn.apache.org/viewvc?rev=1431264&view=rev
Log:
CLEREZZA-727: fixed Triple.HashCode definition an implementations

Modified:
    incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/Triple.java
    incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/impl/TripleImpl.java

Modified: incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/Triple.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/Triple.java?rev=1431264&r1=1431263&r2=1431264&view=diff
==============================================================================
--- incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/Triple.java (original)
+++ incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/Triple.java Thu Jan 10 10:35:58 2013
@@ -42,7 +42,7 @@ public interface Triple {
 
 	/**
 	 * The hash code is computed as follow
-	 * (subject.hashCode() >> 1) ^  subject.hashCode() ^ subject.hashCode() << 1)
+	 * (subject.hashCode() >> 1) ^  predicate.hashCode() ^ object.hashCode() << 1)
 	 * 
 	 * Note that the hash returned is computed including the hash of BNodes, so 
 	 * it is not blank-node blind as in Graph.
@@ -53,4 +53,5 @@ public interface Triple {
 	 */
 	@Override
 	int hashCode();
+
 }

Modified: incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/impl/TripleImpl.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/impl/TripleImpl.java?rev=1431264&r1=1431263&r2=1431264&view=diff
==============================================================================
--- incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/impl/TripleImpl.java (original)
+++ incubator/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/impl/TripleImpl.java Thu Jan 10 10:35:58 2013
@@ -77,7 +77,7 @@ public class TripleImpl implements Tripl
 
 	@Override
 	public int hashCode() {
-		return (subject.hashCode() >> 1) ^ subject.hashCode() ^ (subject.hashCode() << 1);
+		return (subject.hashCode() >> 1) ^ predicate.hashCode() ^ (object.hashCode() << 1);
 	}
 
 	@Override