-
Notifications
You must be signed in to change notification settings - Fork 38.5k
fix ignored exceptions #35047
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
fix ignored exceptions #35047
Conversation
1e3ec20
to
8eacca1
Compare
} | ||
catch (NullPointerException ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats why its important to have empty blocks inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as this so important should give this special attention then. @bclozel
its not about the close as thats the same but about the catch as this seems to differ.
3c9ff87
to
333af51
Compare
333af51
to
d5ceb68
Compare
Signed-off-by: Vincent Potucek <[email protected]>
d5ceb68
to
e6c4c5f
Compare
The Spring codebase sometimes ignores exceptions in catch blocks on purpose. This is often called out by an inline comment. We should make this more obvious by renaming the exception argument in the catch block to declare whether the exception is "ignored" or "expected". See gh-35047 Signed-off-by: Vincent Potucek <[email protected]> [[email protected]: rework commit message] Signed-off-by: Brian Clozel <[email protected]>
thanks |
Thanks for your contribution @Pankraz76 |
avoid round abound and just name it ignored like commonly suggested by static code analysis PMD and IDEA.
its already the pattern so just complain: