dengzhhu653 commented on code in PR #4194:
URL: https://github.com/apache/hive/pull/4194#discussion_r1204971322
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -5841,9 +5851,7 @@ private <T> T doFetchProperties(String key,
java.util.function.Function<MMetasto
return (T) (transform != null? transform.apply(properties) :
properties);
}
} finally {
- if (query != null) {
- query.closeAll();
Review Comment:
nit: I'd prefer `query.closeAll()` other than `query.close()`, quoted from
`Query` class
```
Don't use this method directly; use closeAll() instead. It is intended for
use with try-with-resources.
Throws:
Exception – if this resource cannot be closed
```
If you want to use with try-with-resources, `QueryWrapper` is a choice.
--
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]