commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [3/3] commons-rdf git commit: COMMONSRDF-51: Make sure graph.remove(Triple) ignores langtag case
Date Thu, 26 Jan 2017 14:38:11 GMT
COMMONSRDF-51: Make sure graph.remove(Triple) ignores langtag case

Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/3cf27116
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/3cf27116
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/3cf27116

Branch: refs/heads/COMMONSRDF-51-langtag-lcase
Commit: 3cf271162416df98e63b4e40eb08007a3a754f5a
Parents: 0470e7c
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Thu Jan 26 14:33:35 2017 +0000
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Thu Jan 26 14:33:35 2017 +0000

----------------------------------------------------------------------
 .../test/java/org/apache/commons/rdf/api/AbstractGraphTest.java | 5 ++++-
 .../java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java    | 1 -
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/3cf27116/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
index 8245b5d..3020704 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractGraphTest.java
@@ -399,7 +399,8 @@ public abstract class AbstractGraphTest {
 
         final Graph graph = factory.createGraph();
         graph.add(example1, greeting, upper);
-
+        
+        // any kind of Triple should match
         assertTrue(graph.contains(factory.createTriple(example1, greeting, upper)));
         assertTrue(graph.contains(factory.createTriple(example1, greeting, lower)));
         assertTrue(graph.contains(factory.createTriple(example1, greeting, mixed)));
@@ -491,8 +492,10 @@ public abstract class AbstractGraphTest {
         graph.add(example1, greeting, lower);
         graph.remove(example1, null, upper);
 
+        // Check with Triple
         graph.add(factory.createTriple(example1, greeting, mixed));
         graph.remove(factory.createTriple(example1, greeting, upper));
+        assertFalse(graph.contains(null, greeting, null));
     }
 
     private static Optional<? extends Triple> closableFindAny(Stream<? extends Triple>
stream) {

http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/3cf27116/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
index 76e92f7..55256e2 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaGraphImpl.java
@@ -29,7 +29,6 @@ import org.apache.commons.rdf.api.RDFTerm;
 import org.apache.commons.rdf.api.Triple;
 import org.apache.commons.rdf.jena.JenaGraph;
 import org.apache.commons.rdf.jena.JenaRDF;
-import org.apache.commons.rdf.jena.JenaTriple;
 import org.apache.jena.atlas.iterator.Iter;
 import org.apache.jena.graph.Node;
 import org.apache.jena.rdf.model.Model;


Mime
View raw message