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] Fix #4393 MissingStaticMethodInNonInstantiatableClass: Fix false-positive for field-only class #4392

Merged
merged 3 commits into from Feb 16, 2023

Conversation

dawiddc
Copy link
Contributor

@dawiddc dawiddc commented Feb 14, 2023

Describe the PR

This PR fixes false-positive lombok's UtilityClass MissingStaticMethodInNonInstantiatableClass check for classes that have non-private fields without non-private methods inside.

Related issues

Ready?

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

@adangel adangel added this to the 6.55.0 milestone Feb 14, 2023
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 for the PR!

Could you please create a new bug report/issue for the false positive? We can't reuse #4224, since that is already closed...
And the new case you found is a new bug (although maybe introduced by #4224).

@dawiddc dawiddc changed the title [java] Fix #4224 MissingStaticMethodInNonInstantiatableClass: Fix false-positive for field-only class [java] Fix #4393 MissingStaticMethodInNonInstantiatableClass: Fix false-positive for field-only class Feb 14, 2023
@pmd-test
Copy link

pmd-test commented Feb 14, 2023

1 Message
📖 Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 2 errors and 7 configuration errors.
Full report
Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 2 errors and 7 configuration errors.
Full report

Generated by 🚫 Danger

@dawiddc
Copy link
Contributor Author

dawiddc commented Feb 14, 2023

Thanks for the PR!

Could you please create a new bug report/issue for the false positive? We can't reuse #4224, since that is already closed... And the new case you found is a new bug (although maybe introduced by #4224).

Thanks, issue created and re-linked PR name/desc to #4393

@dawiddc dawiddc requested a review from adangel February 14, 2023 19:51
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants