We're updating the issue view to help you get more done. 

QueryResults.report() may fail to close result

Description

If handler.startQueryResult() throws exception then tqr.close() is not called.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 public static void report(TupleQueryResult tqr, QueryResultHandler handler) throws TupleQueryResultHandlerException, QueryEvaluationException { - handler.startQueryResult(tqr.getBindingNames()); try { + handler.startQueryResult(tqr.getBindingNames()); while (tqr.hasNext()) { BindingSet bindingSet = tqr.next(); handler.handleSolution(bindingSet); } } finally { tqr.close(); } handler.endQueryResult(); }

Environment

None

Status

Assignee

Peter Ansell

Reporter

Mikhail Mazursky

Labels

None

Components

Fix versions

Affects versions

2.7.2
2.6.10

Priority

Trivial