[
https://issues.apache.org/jira/browse/JENA-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890419#comment-15890419
]
ASF subversion and git services commented on JENA-1298:
-------------------------------------------------------
Commit 290594aefc2dfa9cf41350dcae4a8be36f6e94f1 in jena's branch
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=290594a ]
JENA-1298: Close iterator even if not started
> GROUP BY can cause a warning from QueryIteratorCheck.
> -----------------------------------------------------
>
> Key: JENA-1298
> URL: https://issues.apache.org/jira/browse/JENA-1298
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 3.2.0
> Reporter: Andy Seaborne
> Assignee: Andy Seaborne
> Priority: Minor
> Fix For: Jena 3.3.0
>
>
> Example:
> {noformat}
> public class CheckQueryIterator {
> public static void main(String... args) {
> String queryStr = "SELECT ?s { } GROUP BY ?s";
> Query query = QueryFactory.create(queryStr);
> Model model = ModelFactory.createDefaultModel();
> try(QueryExecution qe = QueryExecutionFactory.create(query, model)) {
> ResultSet rs = qe.execSelect();
> // Do not "hasNext"
> //rs.hasNext();
> }
> }
> {noformat}
> Key feature: not touching the "group", going straight to
> {{QueryExecution.close()}}.
> This does not cause any incorrect query results.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)