Skip to content

[java] Fix #6427: Add bitwise and/or/xor to BINARY_PROMOTED_OPS#6573

Merged
adangel merged 2 commits into
pmd:mainfrom
UncleOwen:issue-6427-UnnecessaryCast-false-positive
May 7, 2026
Merged

[java] Fix #6427: Add bitwise and/or/xor to BINARY_PROMOTED_OPS#6573
adangel merged 2 commits into
pmd:mainfrom
UncleOwen:issue-6427-UnnecessaryCast-false-positive

Conversation

@UncleOwen
Copy link
Copy Markdown
Member

Describe the PR

Fix false positive in UnnecessaryCast by adding bitwise and/or/xor to BINARY_PROMOTED_OPS

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)
  • n/a Added (in-code) documentation (if needed)

@UncleOwen UncleOwen changed the title Add bitwise and/or/xor to BINARY_PROMOTED_OPS [java] Fix #6427: Add bitwise and/or/xor to BINARY_PROMOTED_OPS Apr 2, 2026
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 2, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@pmd-actions-helper
Copy link
Copy Markdown
Contributor

pmd-actions-helper Bot commented Apr 2, 2026

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 15 errors and 9 configuration errors.
There are 0 changed duplications, 0 new duplications and 0 removed duplications.
There are 0 changed CPD errors, 0 new CPD errors and 0 removed CPD errors.

Regression Tester Report

(comment created at 2026-04-24 14:38:43+00:00 for 6c3d855)

@UncleOwen UncleOwen marked this pull request as draft April 3, 2026 14:19
@UncleOwen UncleOwen force-pushed the issue-6427-UnnecessaryCast-false-positive branch from 53453b5 to 3c0c0a9 Compare April 3, 2026 15:01
@UncleOwen UncleOwen marked this pull request as ready for review April 3, 2026 15:25
@oowekyala oowekyala self-requested a review April 4, 2026 14:04
@UncleOwen UncleOwen force-pushed the issue-6427-UnnecessaryCast-false-positive branch from a6ff946 to 981dbcc Compare April 17, 2026 18:11
@UncleOwen
Copy link
Copy Markdown
Member Author

@oowekyala Just realized I missed half of your comment. Is this what you were thinking?

@UncleOwen UncleOwen force-pushed the issue-6427-UnnecessaryCast-false-positive branch from 981dbcc to 27e6815 Compare April 17, 2026 18:43
@UncleOwen UncleOwen force-pushed the issue-6427-UnnecessaryCast-false-positive branch from 27e6815 to 6c3d855 Compare April 24, 2026 14:15
@adangel adangel added this to the 7.25.0 milestone May 7, 2026
Copy link
Copy Markdown
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 added a commit that referenced this pull request May 7, 2026
@adangel adangel merged commit 6c3d855 into pmd:main May 7, 2026
13 checks passed
@UncleOwen UncleOwen deleted the issue-6427-UnnecessaryCast-false-positive branch May 7, 2026 12:25
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] UnnecessaryCast: False positive for long cast before bit-shift operations on int/byte

4 participants