Skip to content

[java] Fix #6967: Make violation message of UnusedReturnValue consistent by removing type parameters - #6968

Merged
UncleOwen merged 4 commits into
pmd:mainfrom
UncleOwen:issue-6967-UnusedReturnValue-fix-violation-message
Aug 14, 2026
Merged

UncleOwen merged 4 commits into
pmd:mainfrom
UncleOwen:issue-6967-UnusedReturnValue-fix-violation-message

Conversation

@UncleOwen

@UncleOwen UncleOwen commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Describe the PR

Instead of

Result of 'java.util.Collection<capture#XXX of ? extends com.puppycrawl.tools.checkstyle.checks.whitespace.whitespacearound.Wildcard[]>.size()' is ignored.

the violation now is

Result of 'java.util.Collection.size()' is ignored.

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)

Instead of
Result of 'java.util.Collection<capture#XXX of ? extends com.puppycrawl.tools.checkstyle.checks.whitespace.whitespacearound.Wildcard[]>.size()' is ignored.
the violation now is
Result of 'Collection.size()' is ignored.
@UncleOwen UncleOwen changed the title Fix #6967: Make violation message of UnusedReturnValue consistent by removing type parameters [java] Fix #6967: Make violation message of UnusedReturnValue consistent by removing type parameters Aug 11, 2026
@pmd-actions-helper

pmd-actions-helper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 187 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 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-08-14 20:17:11+00:00 for 1aa428c)

@UncleOwen
UncleOwen marked this pull request as draft August 11, 2026 17:04
@UncleOwen
UncleOwen marked this pull request as ready for review August 11, 2026 17:37

@lukasgraef lukasgraef left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!
I totally missed that during the rule review.

Just one question: Do we need the release notes entry in this case?

Comment thread docs/pages/release_notes.md Resolved
@UncleOwen
UncleOwen merged commit 9c4e6fd into pmd:main Aug 14, 2026
13 checks passed
@adangel adangel added this to the 7.27.0 milestone Aug 15, 2026
@UncleOwen
UncleOwen deleted the issue-6967-UnusedReturnValue-fix-violation-message branch September 29, 2026 21:15
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] UnusedReturnValue produces inconsistent violation messages

3 participants