Skip to content

[java] Fix #6710: Case insensitive comparison in UseStandardCharsets#6716

Merged
UncleOwen merged 2 commits into
pmd:mainfrom
UncleOwen:issue-6710-UseStandardCharsets-false-negative-when-using-lowercase-standard-charset-names
May 27, 2026
Merged

[java] Fix #6710: Case insensitive comparison in UseStandardCharsets#6716
UncleOwen merged 2 commits into
pmd:mainfrom
UncleOwen:issue-6710-UseStandardCharsets-false-negative-when-using-lowercase-standard-charset-names

Conversation

@UncleOwen
Copy link
Copy Markdown
Member

@UncleOwen UncleOwen commented May 26, 2026

Describe the PR

This PR changes UseStandardCharsetsRule.java to use a case insensitive comparison.

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 marked this pull request as draft May 26, 2026 13:46
@UncleOwen UncleOwen force-pushed the issue-6710-UseStandardCharsets-false-negative-when-using-lowercase-standard-charset-names branch from e1875dd to ec44902 Compare May 26, 2026 14:22
@pmd-actions-helper
Copy link
Copy Markdown
Contributor

pmd-actions-helper Bot commented May 26, 2026

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 14 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-05-26 15:04:02+00:00 for 69b5b55)

@UncleOwen UncleOwen marked this pull request as ready for review May 26, 2026 14:41
Copy link
Copy Markdown
Contributor

@zbynek zbynek left a comment

Choose a reason for hiding this comment

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

Looks good. The rule might also need updating for Java 22+, but that's a separate issue #6719

@UncleOwen UncleOwen added this to the 7.25.0 milestone May 27, 2026
@UncleOwen UncleOwen merged commit 87e7a68 into pmd:main May 27, 2026
13 checks passed
@UncleOwen UncleOwen deleted the issue-6710-UseStandardCharsets-false-negative-when-using-lowercase-standard-charset-names branch May 27, 2026 07:00
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] UseStandardCharsets: False negative when using lowercase standard charset names

2 participants