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] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t) #2678

Merged
merged 1 commit into from Jul 31, 2020

Conversation

Drofff
Copy link
Contributor

@Drofff Drofff commented Jul 28, 2020

Describe the PR

The predicate checking whether thrown type is Throwable has been changed to Throwable.class.equals to avoid false-negatives at catch (java.lang.Throwable t).

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by travis)
  • Added (in-code) documentation (if needed)

@pmd-test
Copy link

1 Message
📖 This changeset introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 2 configuration errors.
Full report

Generated by 🚫 Danger

@adangel adangel self-assigned this Jul 31, 2020
@adangel adangel added this to the 6.27.0 milestone Jul 31, 2020
Copy link
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

adangel added a commit that referenced this pull request Jul 31, 2020
adangel added a commit that referenced this pull request Jul 31, 2020
[java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t) #2678
@adangel adangel merged commit 91b942b into pmd:master Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t)
3 participants