clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject svn commit: r1478821 - in /clerezza/trunk/rdf.core/src: main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
Date Fri, 03 May 2013 14:46:50 GMT
Author: hasan
Date: Fri May  3 14:46:49 2013
New Revision: 1478821

URL: http://svn.apache.org/r1478821
Log:
CLEREZZA-761: SPARQL PreParser returns null if no named graphs are specified in query

Modified:
    clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
    clerezza/trunk/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java

Modified: clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java?rev=1478821&r1=1478820&r2=1478821&view=diff
==============================================================================
--- clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
(original)
+++ clerezza/trunk/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
Fri May  3 14:46:49 2013
@@ -58,7 +58,8 @@ public class SparqlPreParser {
             referredGraphs = u.getReferredGraphs();
         }
         if (referredGraphs.isEmpty()) {
-            referredGraphs.add(defaultGraph);
+            return null;
+//            referredGraphs.add(defaultGraph);
         }
         return referredGraphs;
     }

Modified: clerezza/trunk/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java?rev=1478821&r1=1478820&r2=1478821&view=diff
==============================================================================
--- clerezza/trunk/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
(original)
+++ clerezza/trunk/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
Fri May  3 14:46:49 2013
@@ -44,7 +44,7 @@ public class SparqlPreParserTest {
         UriRef defaultGraph = new UriRef("http://example.org/default");
         SparqlPreParser parser = new SparqlPreParser();
         Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStrBuilder.toString(),
defaultGraph);
-        Assert.assertTrue(referredGraphs.toArray()[0].equals(defaultGraph));
+        Assert.assertTrue(referredGraphs == null);
     }
 
     @Test



Mime
View raw message