You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by ha...@apache.org on 2015/04/18 08:21:12 UTC
clerezza git commit: CLEREZZA-961: Fixed SparqlPreParserTest and typo
in code comments in SparqlPreParser
Repository: clerezza
Updated Branches:
refs/heads/master 85bf1746d -> 70f7fc08e
CLEREZZA-961: Fixed SparqlPreParserTest and typo in code comments in SparqlPreParser
Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/70f7fc08
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/70f7fc08
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/70f7fc08
Branch: refs/heads/master
Commit: 70f7fc08e748388c92f7918bb86a2547f9430905
Parents: 85bf174
Author: Hasan <ha...@getunik.com>
Authored: Sat Apr 18 08:16:48 2015 +0200
Committer: Hasan <ha...@getunik.com>
Committed: Sat Apr 18 08:16:48 2015 +0200
----------------------------------------------------------------------
.../org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java | 7 +++----
.../apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java | 6 +++---
2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70f7fc08/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
index b77d93a..c856ea8 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
@@ -54,12 +54,11 @@ public class SparqlPreParser {
}
/**
- * This returns the graphs targeted by the queryString. This are the the
- * triple collections explicitely refreded in FROM and FROM NAMED clauses,
+ * This returns the graphs targeted by the queryString. These are the
+ * triple collections explicitly referred in FROM and FROM NAMED clauses,
* and if the queryString contains no FROM clause the defaultGraph.
*
- * For queries that are not limited to specified set of graphs null is returned.
- *
+ * For queries that are not limited to a specified set of graphs, null is returned.
*
* @param queryString
* @param defaultGraph
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70f7fc08/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
index a261e09..7827247 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
@@ -110,7 +110,7 @@ public class SparqlPreParserTest {
SparqlPreParser parser;
parser = new SparqlPreParser(TcManager.getInstance());
Set<IRI> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
- Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
+ Assert.assertTrue(referredGraphs.contains(DEFAULT_GRAPH));
}
@Test
@@ -121,7 +121,7 @@ public class SparqlPreParserTest {
SparqlPreParser parser;
parser = new SparqlPreParser(TcManager.getInstance());
Set<IRI> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
- Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
+ Assert.assertTrue(referredGraphs.contains(TEST_GRAPH));
}
@Test
@@ -386,7 +386,7 @@ public class SparqlPreParserTest {
SparqlPreParser parser;
parser = new SparqlPreParser(TcManager.getInstance());
Set<IRI> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
- Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
+ Assert.assertTrue(referredGraphs.contains(TEST_GRAPH));
}
@Test