GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] Fix #2186: New Rule: RelianceOnDefaultCharset by UncleOwen · Pull Request #5934 · pmd/pmd

Conversation

@UncleOwen

@UncleOwen UncleOwen commented Jul 24, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Describe the PR

Flags constructor calls / method invocations that rely on the default charset. Recommend specifying the charset explicitely.

Related issues

  • Fix [java] New Rule: RelianceOnDefaultCharset #2186

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@UncleOwen
UncleOwen force-pushed the issue-2186 branch from dacb665 to c4a7f80 Compare July 24, 2025 13:43
@github-actions

github-actions Bot commented Jul 24, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 433 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.

Regression Tester Report

(comment created at 2025-08-07 08:49:41+00:00 for 6eb63af)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UncleOwen
New Rule: RelianceOnDefaultCharset
d426747
Flags constructor calls / method invocations that rely on the default charset.
Recommend specifying the charset explicitely.
@UncleOwen
UncleOwen force-pushed the issue-2186 branch from c4a7f80 to d426747 Compare July 24, 2025 14:00
@adangel adangel added the a:new-rule Proposal to add a new built-in rule label Aug 5, 2025
adangel
adangel approved these changes Aug 7, 2025
View reviewed changes

@adangel adangel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pmd-java/src/main/resources/category/java/bestpractices.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@adangel adangel added this to the 7.17.0 milestone Aug 7, 2025
@UncleOwen
Feedback from review
6eb63af
@adangel
adangel merged commit 30f734b into pmd:main Aug 7, 2025
@UncleOwen
UncleOwen deleted the issue-2186 branch August 7, 2025 16:02
jsotuyod
jsotuyod reviewed Aug 14, 2025
View reviewed changes
Comment thread ...main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/RelianceOnDefaultCharsetRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

jsotuyod
jsotuyod reviewed Aug 14, 2025
View reviewed changes
Comment thread ...main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/RelianceOnDefaultCharsetRule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@UncleOwen UncleOwen mentioned this pull request Aug 14, 2025
[java] Improve performance of RelianceOnDefaultCharset #5989
Merged
2 tasks done
@adangel adangel changed the title Fix #2186: [java] New Rule: RelianceOnDefaultCharset [java] Fix #2186: New Rule: RelianceOnDefaultCharset Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jsotuyod jsotuyod jsotuyod left review comments
@adangel adangel adangel approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

a:new-rule Proposal to add a new built-in rule

Projects

None yet

Milestone

7.17.0

Development

Successfully merging this pull request may close these issues.

[java] New Rule: RelianceOnDefaultCharset

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@UncleOwen @jsotuyod @adangel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.