Skip to content

Conversation

@Pankraz76
Copy link

@Pankraz76 Pankraz76 commented Jun 13, 2025

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:

image

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 13, 2025
@Pankraz76 Pankraz76 force-pushed the fix-ignored-exceptions branch from 1e3ec20 to 8eacca1 Compare June 13, 2025 10:01
@Pankraz76 Pankraz76 marked this pull request as ready for review June 13, 2025 10:01
@Pankraz76 Pankraz76 marked this pull request as draft June 13, 2025 10:18
out.flush();
// need to str
}
catch (NullPointerException ex) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Author

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.

Copy link
Author

@Pankraz76 Pankraz76 Jun 13, 2025

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.

@Pankraz76 Pankraz76 force-pushed the fix-ignored-exceptions branch from 3c9ff87 to 333af51 Compare June 13, 2025 10:27
@Pankraz76 Pankraz76 marked this pull request as ready for review June 13, 2025 10:29
@Pankraz76 Pankraz76 force-pushed the fix-ignored-exceptions branch from 333af51 to d5ceb68 Compare June 13, 2025 14:03
Signed-off-by: Vincent Potucek <[email protected]>
@Pankraz76 Pankraz76 force-pushed the fix-ignored-exceptions branch from d5ceb68 to e6c4c5f Compare June 13, 2025 14:11
@bclozel bclozel self-assigned this Jun 14, 2025
@bclozel bclozel added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 15, 2025
@bclozel bclozel added this to the 7.0.0-M7 milestone Jun 15, 2025
bclozel pushed a commit that referenced this pull request Jun 15, 2025
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]>
@bclozel bclozel closed this in af7758c Jun 15, 2025
@Pankraz76
Copy link
Author

thanks

@bclozel
Copy link
Member

bclozel commented Jun 15, 2025

Thanks for your contribution @Pankraz76

izeye added a commit to izeye/spring-framework that referenced this pull request Jun 22, 2025
izeye added a commit to izeye/spring-framework that referenced this pull request Jun 22, 2025
This commit also changes to use "ignored" for exception variable names instead of "ignore".

See spring-projectsgh-35047

Signed-off-by: Johnny Lim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants