aturoczy commented on code in PR #4455:
URL: https://github.com/apache/hive/pull/4455#discussion_r1256322728
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -3957,10 +3957,10 @@ private void firePreEvent(PreEventContext event) throws
MetaException {
for (MetaStorePreEventListener listener : preListeners) {
try {
listener.onEvent(event);
- } catch (NoSuchObjectException e) {
- throw new MetaException(e.getMessage());
- } catch (InvalidOperationException e) {
- throw new MetaException(e.getMessage());
+ } catch (NoSuchObjectException | InvalidOperationException e) {
+ MetaException me = new MetaException(e.getMessage());
Review Comment:
You do not need to invoke the initCause the HiveMetaException has the
following constructor
```
public HiveMetaException(String message, Throwable cause) {
super(message, cause);
}
```
--
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]