distributedlog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brennon York (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DL-136) Avoid empty catch blocks
Date Thu, 15 Dec 2016 22:12:58 GMT

    [ https://issues.apache.org/jira/browse/DL-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15752656#comment-15752656
] 

Brennon York edited comment on DL-136 at 12/15/16 10:12 PM:
------------------------------------------------------------

As an update, I just ran a CheckStyle with only the check for empty catch blocks and, within
{{src/main}}, there are only 9 offenders. There are another ~50 offenders in the {{src/test}}
dirs. Will update the {{src/main}} first and also try an independent review to see if I catch
anything with some bash scripting.


was (Author: boyork):
As an update, I just ran a CheckStyle with only the check for empty catch blocks and, within
{{src/main}}, there are only 9 offenders. There are another ~50 offenders in the {{src/test}}
dirs. Will update the {{src/main}} first and go from there.

> Avoid empty catch blocks
> ------------------------
>
>                 Key: DL-136
>                 URL: https://issues.apache.org/jira/browse/DL-136
>             Project: DistributedLog
>          Issue Type: Task
>            Reporter: Sijie Guo
>            Assignee: Brennon York
>              Labels: help-wanted
>
> Based on the code analysis here : https://www.kiuwan.com/blog/analyzing_distributedlog_twitter-2/,
there are 22 Times: Catching exceptions with empty bodies.
> {quote}
> There are exceptions of different types: InterruptedException, KeeperException, Exception,
etc.. Even though we think that these exceptions should never occur, if they are captured
it means that they are technically possible. In case that they do happen, it will be very
difficult to know what is happening and to diagnose the problem. It is very recommendable,
at least to add a log trace, in case these exceptions are triggered.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message