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 FPs in UnnecessaryBoxing #5019

Merged
merged 14 commits into from
May 31, 2024

Conversation

oowekyala
Copy link
Member

@oowekyala oowekyala commented May 14, 2024

Describe the PR

This fixes many FPs of the rule, and improves some poorly tested parts of PolyResolution (related to conversion contexts). This last change also helps UnnecessaryCast.

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)

Change a bit the behavior for some test cases.
Previously the rule reported necessary boxing
that could be simplified another way, but that
is an edge case and not worth complexifying
the rule
@pmd-test
Copy link

pmd-test commented May 14, 2024

1 Message
📖 Compared to master:
This changeset changes 6 violations,
introduces 9 new violations, 0 new errors and 0 new configuration errors,
removes 136 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to master:
This changeset changes 6 violations,
introduces 9 new violations, 0 new errors and 0 new configuration errors,
removes 140 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to master:
This changeset changes 6 violations,
introduces 9 new violations, 0 new errors and 0 new configuration errors,
removes 142 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to master:
This changeset changes 0 violations,
introduces 6 new violations, 0 new errors and 0 new configuration errors,
removes 252 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to master:
This changeset changes 85 violations,
introduces 6 new violations, 0 new errors and 0 new configuration errors,
removes 70 violations, 0 errors and 0 configuration errors.
Download full report as build artifact

Generated by 🚫 Danger

@oowekyala oowekyala marked this pull request as ready for review May 24, 2024 12:06
@adangel adangel added this to the 7.2.0 milestone May 31, 2024
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!

@adangel adangel merged commit 4ea0c07 into pmd:master May 31, 2024
3 checks passed
adangel added a commit that referenced this pull request May 31, 2024
adangel added a commit that referenced this pull request May 31, 2024
Merge pull request #5019 from oowekyala:issue4903-unnecessaryboxing
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