Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[java] Remove special cases from rule EmptyCatchBlock #2893

Closed
oowekyala opened this issue Nov 2, 2020 · 1 comment
Closed

[java] Remove special cases from rule EmptyCatchBlock #2893

oowekyala opened this issue Nov 2, 2020 · 1 comment
Labels
an:enhancement An improvement on existing features / rules
Milestone

Comments

@oowekyala
Copy link
Member

Is your feature request related to a problem? Please describe.

For some reason EmptyCatchBlock special-cases InterruptedException and CloneNotSupportedException. Catch blocks are already ignored if the exception is named ignored or expected, which is nice as it signals to the reader that the empty catch block was not a mistake. I think this holds even for those exception types, and code would be clearer if they were not special-cases. Besides, this particularity was not documented.

Describe the solution you'd like
Remove those special cases and make EmptyCatchBlock flag InterruptedException and CloneNotSupportedException just the same as other exception types

Describe alternatives you've considered
None

@oowekyala oowekyala added the an:enhancement An improvement on existing features / rules label Nov 2, 2020
@adangel adangel added this to the 7.0.0 milestone Nov 6, 2020
@oowekyala
Copy link
Member Author

Fixed by #2899

@adangel adangel mentioned this issue Jan 23, 2023
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
an:enhancement An improvement on existing features / rules
Projects
None yet
Development

No branches or pull requests

2 participants