Return-Path: X-Original-To: apmail-commonsrdf-commits-archive@minotaur.apache.org Delivered-To: apmail-commonsrdf-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6B8210CB3 for ; Mon, 30 Mar 2015 01:11:36 +0000 (UTC) Received: (qmail 85576 invoked by uid 500); 30 Mar 2015 01:11:36 -0000 Delivered-To: apmail-commonsrdf-commits-archive@commonsrdf.apache.org Received: (qmail 85548 invoked by uid 500); 30 Mar 2015 01:11:36 -0000 Mailing-List: contact commits-help@commonsrdf.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commonsrdf.incubator.apache.org Delivered-To: mailing list commits@commonsrdf.incubator.apache.org Received: (qmail 85539 invoked by uid 99); 30 Mar 2015 01:11:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2015 01:11:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 30 Mar 2015 01:11:31 +0000 Received: (qmail 82078 invoked by uid 99); 30 Mar 2015 01:09:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2015 01:09:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B4D1EE2EFD; Mon, 30 Mar 2015 01:09:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ansell@apache.org To: commits@commonsrdf.incubator.apache.org Date: Mon, 30 Mar 2015 01:10:01 -0000 Message-Id: <58db424f58694a0091673a1ac121b734@git.apache.org> In-Reply-To: <1cf5f6587f974f16b678c58ae5600115@git.apache.org> References: <1cf5f6587f974f16b678c58ae5600115@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/18] incubator-commonsrdf git commit: Simplify GraphImpl triple matching since equals is now guaranteed to directly work X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Sat Mar 28 20:56:04 2015 +1100 Committer: Peter Ansell 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;