You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "ctubbsii (via GitHub)" <gi...@apache.org> on 2025/03/17 21:46:51 UTC
Re: [PR] Recent change to Upgrader12to13 ate all Exceptions [accumulo]
ctubbsii commented on code in PR #5409:
URL: https://github.com/apache/accumulo/pull/5409#discussion_r1999721285
##########
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java:
##########
@@ -141,6 +141,8 @@ private void createFateTable(ServerContext context) {
} catch (Exception e) {
if (e.getCause() instanceof KeeperException.NodeExistsException) {
LOG.debug("Fate table node already exists in ZooKeeper");
+ } else {
+ throw e;
}
Review Comment:
This change is looking for a very specific exception. There's no reason to check it with instanceof. It should just use a regular catch block:
```suggestion
} catch (KeeperException.NodeExistsException e) {
LOG.debug("Fate table node already exists in ZooKeeper");
```
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org