From 2c325bcc0f7d2b83742b9c6982e77628904a126c Mon Sep 17 00:00:00 2001 From: Eamonn Saunders <esaunders@basistech.com> Date: Mon, 23 Mar 2015 16:46:16 -0400 Subject: [PATCH] Added an extra sentence to executeQuery() documentation detailing that they must call CaseDbQuery.close() if they do not use the try-with-resources feature of Java. --- bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java index bbf9b493b..426222eb1 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java @@ -4101,9 +4101,12 @@ public void closeRunQuery(ResultSet resultSet) throws SQLException { /** * This method allows developers to run arbitrary SQL "SELECT" - * queries. The CaseDbQuery object will take care to acquiring + * queries. The CaseDbQuery object will take care of acquiring * the necessary database lock and when used in a try-with-resources * block will automatically take care of releasing the lock. + * If you do not use a try-with-resources block you must call + * CaseDbQuery.close() once you are done processing the results of + * the query. * @param query The query string to execute. * @return A CaseDbQuery instance. * @throws TskCoreException -- GitLab