You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/11/04 09:15:23 UTC
[2/2] incubator-commonsrdf git commit: Corrected rdf4j Quad.equals()
Corrected rdf4j Quad.equals()
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/17dab006
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/17dab006
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/17dab006
Branch: refs/heads/master
Commit: 17dab006d254934e21cb1ba36e3336db73cd0c0d
Parents: 33bc626
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri Nov 4 10:15:07 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri Nov 4 10:15:07 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/17dab006/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
index 6962803..228b4f0 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/QuadImpl.java
@@ -51,10 +51,12 @@ final class QuadImpl implements Quad, RDF4JQuad {
@Override
public boolean equals(Object obj) {
- if (obj instanceof Triple) {
- Triple triple = (Triple) obj;
- return getSubject().equals(triple.getSubject()) && getPredicate().equals(triple.getPredicate())
- && getObject().equals(triple.getObject());
+ if (obj instanceof Quad) {
+ Quad quad = (Quad) obj;
+ return getGraphName().equals(quad.getGraphName()) &&
+ getSubject().equals(quad.getSubject()) &&
+ getPredicate().equals(quad.getPredicate()) &&
+ getObject().equals(quad.getObject());
}
return false;
}