PMD 7.19.0 released

28 November 2025


28-November-2025 - 7.19.0

The PMD team is pleased to announce PMD 7.19.0.

This is a minor release.

Table Of Contents

🚀️ New and noteworthy

Updated PMD Designer

This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog (7.19.0) and PMD Designer Changelog (7.19.1).

🌟️ New and Changed Rules

New Rules

  • The new Apex rule AvoidFutureAnnotation finds usages of the @Future annotation. It is a legacy way to execute asynchronous Apex code. New code should implement the Queueable interface instead.
  • The new Java rule EnumComparison finds usages of equals() on enum constants or values. Enums should be compared directly with == instead of equals() which has some advantages (e.g. static type checking at compile time).
  • The new Apex rule NcssCount replaces the four rules “ExcessiveClassLength”, “NcssConstructorCount”, “NcssMethodCount”, and “NcssTypeCount”. The new rule uses the metrics framework to achieve the same. It has two properties, to define the report level for method and class sizes separately. Constructors and methods are considered the same.
    The rule has been added to the quickstart ruleset.
    Note: The new metric is implemented more correct than in the old rules. E.g. it considers now also switch statements and correctly counts if-statements only once and ignores method calls that are part of an expression and not a statement on their own. This leads to different numbers. Keep in mind, that NCSS counts statements and not lines of code. Statements that are split on multiple lines are still counted as one.
  • The new PL/SQL rule NcssCount replaces the rules “ExcessiveMethodLength”, “ExcessiveObjectLength”, “ExcessivePackageBodyLength”, “ExcessivePackageSpecificationLength”, “ExcessiveTypeLength”, “NcssMethodCount” and “NcssObjectCount”. The new rule uses the metrics framework to achieve the same. It has two properties, to define the report level for method and object sizes separately.
    Note: the new metric is implemented more correct than in the old rules, so that the actual numbers of the NCSS metric from the old rules might be different from the new rule “NcssCount”. Statements that are split on multiple lines are still counted as one.

Deprecated Rules

🐛️ Fixed Issues

  • core
    • #4767: [core] Deprecate old symboltable API
  • apex-bestpractices
    • #6203: [apex] New Rule: Avoid Future Annotation
  • apex-design
    • #2128: [apex] Merge NCSS count rules for Apex
  • java
    • #5689: [java] Members of record should be in scope in record header
    • #6256: [java] java.lang.IllegalArgumentException: Invalid target type of type annotation for method or ctor type annotation: 19
  • java-bestpractices
    • #5820: [java] GuardLogStatement recognizes that a string is a compile-time constant expression only if at first position
    • #6188: [java] UnitTestShouldIncludeAssert false positive when TestNG @Test.expectedException present
    • #6193: [java] New Rule: Always compare enum values with ==
  • java-codestyle
    • #6053: [java] ModifierOrder false-positives with type annotations and type parameters (typeAnnotations = anywhere)
  • java-errorprone
    • #4742: [java] EmptyFinalizer should not trigger if finalize method is final and class is not
    • #6072: [java] OverrideBothEqualsAndHashCodeOnComparable should not be required for record classes
    • #6092: [java] AssignmentInOperand false positive in 7.17.0 for case blocks in switch statements
    • #6096: [java] OverrideBothEqualsAndHashCodeOnComparable on class with lombok.EqualsAndHashCode annotation
    • #6199: [java] AssignmentInOperand: description of property allowIncrementDecrement is unclear
    • #6273: [java] TestClassWithoutTestCases documentation does not mention test prefixes
  • java-performance
    • #4577: [java] UseArraysAsList with condition in loop
    • #5071: [java] UseArraysAsList should not warn when elements are skipped in array
  • plsql-design
    • #4326: [plsql] Merge NCSS count rules for PL/SQL
  • maintenance
    • #5701: [core] net.sourceforge.pmd.cpd.SourceManager has public methods

🚨️ API Changes

Deprecations

✨️ Merged pull requests

  • #6081: [java] Fix #6072: OverrideBothEqualsAndHashCodeOnComparable should not be required for record classes - UncleOwen (@UncleOwen)
  • #6192: [java] Fix #6053: ModifierOrder - consider type params - Andreas Dangel (@adangel)
  • #6194: chore: always place type annotations on the type - Andreas Dangel (@adangel)
  • #6195: chore: always compare enums with == - Andreas Dangel (@adangel)
  • #6196: [java] New Rule: EnumComparison - Andreas Dangel (@adangel)
  • #6198: [apex] New rule NcssCount to replace old Ncss*Count rules - Andreas Dangel (@adangel)
  • #6201: [java] Fix #6199: AssignmentInOperandRule: Update description of allowIncrementDecrement property - Lukas Gräf (@lukasgraef)
  • #6202: [java] Fix #6188: UnitTestsShouldIncludeAssert - FP when TestNG @Test.expectedException is present - Lukas Gräf (@lukasgraef)
  • #6204: [apex] Add rule to limit usage of @Future annotation - Mitch Spano (@mitchspano)
  • #6214: [plsql] New rule NcssCount to replace old Ncss*Count rules - Andreas Dangel (@adangel)
  • #6217: [doc] Add Blue Cave to known tools using PMD - Jude Pereira (@judepereira)
  • #6227: [java] UseArraysAsList: check increment - Andreas Dangel (@adangel)
  • #6228: [java] UseArraysAsList: skip when if-statements - Andreas Dangel (@adangel)
  • #6229: chore: remove public methods from SourceManager - Andreas Dangel (@adangel)
  • #6238: [java] Fix #6096: Detect Lombok generated equals/hashCode in Comparable - Marcel (@mrclmh)
  • #6249: [core] Deprecate old symboltable API - Andreas Dangel (@adangel)
  • #6250: chore: fail build for compiler warnings - Andreas Dangel (@adangel)
  • #6251: [java] Fix #6092: AssignmentInOperand false positive in 7.17.0 for case statements - Marcel (@mrclmh)
  • #6255: [java] Fix #4742: EmptyFinalizer should not trigger if finalize method is final and class is not - Marcel (@mrclmh)
  • #6258: [java] Fix #5820: GuardLogStatement recognizes that a string is a compile-time constant expression only if at first position - Marcel (@mrclmh)
  • #6259: [java] Fix #5689: Issue with scoping of record members - Clément Fournier (@oowekyala)
  • #6277: [doc] Add button to copy configuration snippet - Zbynek Konecny (@zbynek)
  • #6278: [doc] TestClassWithoutTestCases: Mention test prefixes - Marcel (@mrclmh)
  • #6280: [ci] Exclude build resources from spring-framework for regression tester - Clément Fournier (@oowekyala)
  • #6282: [java] Fix #6256: ignore invalid annotation type - Andreas Dangel (@adangel)

📦️ Dependency updates

  • #6197: Bump PMD from 7.17.0 to 7.18.0
  • #6205: chore(deps): bump junit.version from 6.0.0 to 6.0.1
  • #6206: chore(deps): bump org.checkerframework:checker-qual from 3.51.1 to 3.52.0
  • #6207: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.17.7 to 1.17.8
  • #6208: chore(deps): bump com.google.protobuf:protobuf-java from 4.32.1 to 4.33.0
  • #6209: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.0.1 to 12.1.1
  • #6210: chore(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.13 to 0.8.14
  • #6219: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.17.8 to 1.18.0
  • #6220: chore(deps): bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0
  • #6221: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.17.8 to 1.18.0
  • #6222: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2
  • #6223: chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.2.0.4988 to 5.3.0.6276
  • #6240: chore(deps): bump ruby/setup-ruby from 1.267.0 to 1.268.0
  • #6241: chore(deps): bump actions/checkout from 5.0.0 to 5.0.1
  • #6242: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.0 to 1.18.1
  • #6243: chore(deps): bump org.scala-lang:scala-library from 2.13.17 to 2.13.18
  • #6244: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.0 to 1.18.1
  • #6245: chore(deps): bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0
  • #6246: chore(deps): bump org.scala-lang:scala-reflect from 2.13.17 to 2.13.18
  • #6247: chore(deps): bump com.google.protobuf:protobuf-java from 4.33.0 to 4.33.1
  • #6263: chore(deps): bump actions/checkout from 5.0.1 to 6.0.0
  • #6264: chore(deps): bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0
  • #6265: chore(deps): bump actions/create-github-app-token from 2.1.4 to 2.2.0
  • #6266: chore(deps): bump scalameta.version from 4.14.1 to 4.14.2
  • #6267: chore(deps): bump org.codehaus.mojo:versions-maven-plugin from 2.19.1 to 2.20.1
  • #6281: Bump build-tools from 35 to 36
  • #6283: Bump PMD Designer from 7.10.0 to 7.19.1

📈️ Stats

  • 122 commits
  • 44 closed tickets & PRs
  • Days since last release: 28