afs commented on code in PR #2253:
URL: https://github.com/apache/jena/pull/2253#discussion_r1500971015


##########
jena-rdfconnection/src/main/java/org/apache/jena/rdflink/RDFLinkHTTP.java:
##########
@@ -241,77 +243,111 @@ public QueryExec query(Query query) {
 
     @Override
     public QueryExecBuilder newQuery() {
-        return createQExecBuilder();
+        return createQExecBuilder(null);
     }
 
     // Create the QExec
 
     private QueryExec queryExec(Query query, String queryString, QueryType 
queryType) {
-        checkQuery();
-        if ( query == null && queryString == null )
-            throw new InternalErrorException("Both query and query string are 
null");
-        if ( query == null ) {
-            if ( parseCheckQueries )
-                // Don't retain the query.
-                QueryFactory.create(queryString);

Review Comment:
   Something has changed because this:
   ```
       public static void main(String... args) {
           RDFLink link = 
RDFLinkHTTP.service("http://localhost:3030/ds";).parseCheckSPARQL(true).build();
           try ( link; ) {
               link.query("Custom");
           }
           System.out.println("Done");
       }
   ```
   throws an exception in Jena5/main but not in this PR. The parse error has 
moved to the point of execution.
   
   Please add to `TestRDFLinkHTTP`:
   ```
    @Test(expected=QueryParseException.class)
       public void non_standard_syntax_3() {
           RDFLink link = link(true);
           try ( link ) {
               link.query("custom");
           }
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to