[ 
https://issues.apache.org/jira/browse/JENA-1382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16134344#comment-16134344
 ] 

ASF subversion and git services commented on JENA-1382:
-------------------------------------------------------

Commit 98db31411757c5464ab76cc524bd8dd33a9f2753 in jena's branch 
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=98db314 ]

JENA-1382: Check query exists to be tested.

> NPE in ResultSetClosable
> ------------------------
>
>                 Key: JENA-1382
>                 URL: https://issues.apache.org/jira/browse/JENA-1382
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: Jena 3.2.0, Jena 3.3.0, Jena 3.4.0
>            Reporter: Lorenz Bühmann
>            Priority: Minor
>
> Using {{ResultSetClosable}} leads to a NPE for {{QueryExecution}} objects 
> that have been created based on the query string only, i.e. without a parsed 
> {{Query}} object because of the [sanity 
> check|https://github.com/apache/jena/blob/master/jena-arq/src/main/java/org/apache/jena/query/ResultSetCloseable.java#L38]
>  regarding {{SELECT}} queries. 
> Example:
> {code:java}
> QueryEngineHttp qe = new QueryEngineHttp("http://dbpedia.org/sparql";, "select 
> * { ?s ?p ?o } limit 1");
> try(ResultSetCloseable rs = ResultSetCloseable.closableResultSet(qe)) {
>   rs.hasNext();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to