commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ans...@apache.org
Subject [07/18] incubator-commonsrdf git commit: Simplify GraphImpl triple matching since equals is now guaranteed to directly work
Date Mon, 30 Mar 2015 01:10:01 GMT
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_ansell@yahoo.com>
Authored: Sat Mar 28 20:56:04 2015 +1100
Committer: Peter Ansell <p_ansell@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;


Mime
View raw message