Aklakan commented on code in PR #3063:
URL: https://github.com/apache/jena/pull/3063#discussion_r1992005204
##########
jena-rdfconnection/src/main/java/org/apache/jena/rdflink/RDFLinkAdapter.java:
##########
@@ -89,10 +84,18 @@ public DatasetGraph getDataset() {
}
@Override
- public QueryExec query(Query query) { return
QueryExec.adapt(conn.query(query)); }
+ public QueryExec query(Query query) {
+ try (QueryExecution qExec = conn.query(query)) {
+ return QueryExec.adapt(qExec);
Review Comment:
IMHO this doesn't look right - this would return an adapter backed by a
closed QueryExecution object - so any attempt to use the returned `QueryExec`
such as `.select()` or `.construct()` should fail because the backing entity
has already been closed.
(same below)
--
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]