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] UseUtilityClass implementation hardcodes a message instead of using the one defined in the XML · Issue #5023 · pmd/pmd

[java] UseUtilityClass implementation hardcodes a message instead of using the one defined in the XML #5023

New issue
Copy link
New issue
Copy link
Closed
#5931
Closed
[java] UseUtilityClass implementation hardcodes a message instead of using the one defined in the XML#5023
#5931
Copy link
Labels
an:enhancementAn improvement on existing features / rules
Milestone
7.17.0

Description

@jsotuyod
jsotuyod
opened on May 17, 2024
Issue body actions

The rule implementation hardcodes a message instead of using the on defined in the XML. There are legit uses of this (ie: rules that provide multiple messages with greater detail for particular situations), but this one only produces the one message…

pmd/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/UseUtilityClassRule.java

Lines 81 to 82 in ae76c8f

message = "This utility class has a non-private constructor";
asCtx(data).addViolationWithMessage(klass, message);

Originally posted by @jsotuyod in #4761 (reply in thread)

Activity

  1. jsotuyod
    added
    an:enhancementAn improvement on existing features / rules
    on Jun 7, 2024
  2. adangel
    changed the title [-][java] UseUtilityClass implementation hardcodes a message instead of using the on defined in the XML[/-] [+][java] UseUtilityClass implementation hardcodes a message instead of using the one defined in the XML[/+] on Jul 24, 2025
  3. adangel
    added this to the 7.17.0 milestone on Aug 7, 2025
  4. adangel
    added a commit that references this issue on Aug 7, 2025

    Fix pmd#5023: [java] Fix UseUtilityClassRule to use the message provi…

    This issue will close once commit 402f7ae is merged into the 'main' branch.
    402f7ae
  5. adangel
    closed this as completedin 402f7aeon Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    an:enhancementAn improvement on existing features / rules

    Type

    No type

    Projects

    No projects

      Milestone

      • 7.17.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.