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] Rename rules and properties with JUnit5 in the name · Issue #6704 · pmd/pmd

[java] Rename rules and properties with JUnit5 in the name #6704

New issue
Copy link
New issue
Copy link
Closed
#6707
Closed
[java] Rename rules and properties with JUnit5 in the name#6704
#6707
Copy link
Labels
is:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them
Milestone
7.25.0

Description

@UncleOwen
UncleOwen
opened on May 22, 2026
Issue body actions

As discussed in #6682, we should rename all rules and properties which have "JUnit5" as part of their name. JUnit 6 uses the same class names as JUnit 5.

Those are:

  • JUnit5TestShouldBePackagePrivate should be renamed to JUnitJupiterTestShouldBePackagePrivate. (The old rule needs to be deprecated)
  • JUnit5TestNoPrivateModifier should be renamed to JUnitJupiterTestNoPrivateModifier (No link, because this rule isn't released yet. If we do this before 7.25.0, no deprecation needed. Otherwise see above)
  • MethodNamingConventions, property junit5TestPattern should be renamed to junitJupiterTestPattern. (The old attribute needs to be deprecated)

Activity

  1. UncleOwen
    changed the title [-]Rename rules and properties with JUnit5 in the name[/-] [+][java] Rename rules and properties with JUnit5 in the name[/+] on May 22, 2026
  2. UncleOwen commented on May 22, 2026

    @UncleOwen
    UncleOwen
    on May 22, 2026
    MemberAuthor
    More actions

    @adangel Should issues like this get the is:deprecation tag?

  3. adangel commented on May 22, 2026

    @adangel
    adangel
    on May 22, 2026
    Member
    More actions

    @adangel Should issues like this get the is:deprecation tag?

    Probably yes. But we don't use the labels as strict as milestones - meaning, it doesn't have any effect e.g. on the release notes generation. Labels show up when you look at the milestone view (e.g. https://github.com/pmd/pmd/milestone/99 ) and might help people to grasp important changes. But we don't use the labels consistently.

    As for the renaming rules part, see https://docs.pmd-code.org/latest/pmd_devdocs_rule_deprecation_policy.html
    And also have a look at old release notes - we usually mention this also in the release notes, e.g. https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.7.0 - in the top under "Rule Changes" and in the bottom under "API Changes". Also note, that we rename the rule impl. class and provide a deprecated subclass of it for compatibility (see

    pmd/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/JUnitAssertionsShouldIncludeMessageRule.java

    Lines 10 to 11 in e7d9729

    @Deprecated
    public class JUnitAssertionsShouldIncludeMessageRule extends UnitTestAssertionsShouldIncludeMessageRule {
    )

    One thing, that is not documented, but that I tried to do is: Mention in the new rule description the old name ("Note: This rule was named ... before PMD ...", e.g. https://docs.pmd-code.org/latest/pmd_rules_java_bestpractices.html#unittestassertionsshouldincludemessage) - just if we have removed the old (deprecated) rule in the next major version, someone still has a chance to find the rule by its old name.
    The deprecation notice for the old name (e.g. https://docs.pmd-code.org/latest/pmd_rules_java_bestpractices.html#junitassertionsshouldincludemessage) is generated automatically.

  4. UncleOwen
    added
    is:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them
    on May 22, 2026
  5. UncleOwen commented on May 22, 2026

    @UncleOwen
    UncleOwen
    on May 22, 2026
    MemberAuthor
    More actions

    @adangel Thanks for the writeup. Some of that I already knew, some of that I definitely would have missed (e.g. leaving a .java file in the old place)

  6. UncleOwen
    added a commit that references this issue on May 24, 2026

    [java] Fix #6704: rename rules and properties with JUnit5 in the name (…

    This issue will close once commit 0251a55 is merged into the 'main' branch.
    0251a55
  7. UncleOwen
    closed this as completedin #6707on May 24, 2026
  8. UncleOwen
    added this to the 7.25.0 milestone on May 24, 2026
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

    is:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them

    Type

    No type

    Projects

    No projects

      Milestone

      • 7.25.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.