made sure that on function library the result set are close
@@ -80,7 +80,7 @@ public class OFunctionLibraryImpl {
// LOAD ALL THE FUNCTIONS IN MEMORY
if (db.getMetadata().getImmutableSchemaSnapshot().existsClass("OFunction")) {
- OResultSet result = db.query("select from OFunction order by name");
+ try(OResultSet result = db.query("select from OFunction order by name")) {
while (result.hasNext()) {
OResult res = result.next();
ODocument d = (ODocument) res.getElement().get();
@@ -97,6 +97,7 @@ public class OFunctionLibraryImpl {
}
}
}
+ }
public void droppedFunction(ODocument function) {
functions.remove(function.field("name").toString());
