You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by an...@apache.org on 2015/03/30 03:10:01 UTC
[07/18] incubator-commonsrdf git commit: Simplify GraphImpl triple
matching since equals is now guaranteed to directly work
Simplify GraphImpl triple matching since equals is now guaranteed to
directly work
Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/c75c537d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/c75c537d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/c75c537d
Branch: refs/heads/master
Commit: c75c537d99b1047f1b56d2bc84327c6b2994d593
Parents: a8ba2a6
Author: Peter Ansell <p_...@yahoo.com>
Authored: Sat Mar 28 20:56:04 2015 +1100
Committer: Peter Ansell <p_...@yahoo.com>
Committed: Sat Mar 28 20:56:04 2015 +1100
----------------------------------------------------------------------
.../main/java/org/apache/commons/rdf/simple/GraphImpl.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/c75c537d/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java b/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
index 5f81048..24720b3 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/GraphImpl.java
@@ -133,18 +133,15 @@ final class GraphImpl implements Graph {
// Lacking the requirement for .equals() we have to be silly
// and test ntriples string equivalance
if (subject != null
- && !t.getSubject().ntriplesString()
- .equals(subject.ntriplesString())) {
+ && !t.getSubject().equals(subject)) {
return false;
}
if (predicate != null
- && !t.getPredicate().ntriplesString()
- .equals(predicate.ntriplesString())) {
+ && !t.getPredicate().equals(predicate)) {
return false;
}
if (object != null
- && !t.getObject().ntriplesString()
- .equals(object.ntriplesString())) {
+ && !t.getObject().equals(object)) {
return false;
}
return true;