You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/12/10 17:31:27 UTC
git commit: fix for MARMOTTA-401 (better hashcodes for literals)
Updated Branches:
refs/heads/develop 5ede51633 -> 0596fa600
fix for MARMOTTA-401 (better hashcodes for literals)
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/0596fa60
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/0596fa60
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/0596fa60
Branch: refs/heads/develop
Commit: 0596fa600d4cfc16a15dc7ebe2a1f97ebf7dffb1
Parents: 5ede516
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Dec 10 17:31:22 2013 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Dec 10 17:31:22 2013 +0100
----------------------------------------------------------------------
.../java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/0596fa60/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
index b1d3d85..c2f7e85 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/model/rdf/KiWiLiteral.java
@@ -172,12 +172,12 @@ public abstract class KiWiLiteral extends KiWiNode implements Literal {
return false;
}
-
-
-
@Override
public int hashCode() {
- return this.getLabel().hashCode();
+ int result = locale != null ? locale.hashCode() : 0;
+ result = 31 * result + (type != null ? type.hashCode() : 0);
+ result = 32 * result + this.getLabel().hashCode();
+ return result;
}