Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
Releases: pmd/pmd
PMD 7.20.0-SNAPSHOT (18-December-2025)
28-December-2025 - 7.20.0-SNAPSHOT
The PMD team is pleased to announce PMD 7.20.0-SNAPSHOT.
This is a minor release.
Table Of Contents
- 🚀️ New and noteworthy
- 🐛️ Fixed Issues
- 🚨️ API Changes
- ✨️ Merged pull requests
- 📦️ Dependency updates
- 📈️ Stats
🚀️ New and noteworthy
🐛️ Fixed Issues
- java-bestpractices
- #6257: [java] UnusedLocalVariable: False positive with instanceof pattern guard
- java-codestyle
- maintenance
- #6230: [core] Single module snapshot build fails
🚨️ API Changes
✨️ Merged pull requests
📦️ Dependency updates
📈️ Stats
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.19.0 (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
- 🌟️ New and Changed Rules
- 🐛️ Fixed Issues
- 🚨️ API Changes
- ✨️ Merged pull requests
- 📦️ Dependency updates
- 📈️ Stats
🚀️ New and noteworthy
Updated PMD Designer
This PMD release ships a new version of the pmd-designer.
For the changes, seePMD Designer Changelog (7.19.0)
andPMD Designer Changelog (7.19.1).
🌟️ New and Changed Rules
New Rules
- The new Apex rule
AvoidFutureAnnotationfinds usages of the@Future
annotation. It is a legacy way to execute asynchronous Apex code. New code should implement
theQueueableinterface instead. - The new Java rule
EnumComparisonfinds usages ofequals()on
enum constants or values. Enums should be compared directly with==instead ofequals()which
has some advantages (e.g. static type checking at compile time). - The new Apex rule
NcssCountreplaces 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
NcssCountreplaces 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
- The Apex rule
ExcessiveClassLengthhas been deprecated. UseNcssCountto
find big classes or create a custom XPath based rule using//ApexFile[UserClass][@EndLine - @BeginLine > 1000]. - The Apex rules
NcssConstructorCount,NcssMethodCount, andNcssTypeCounthave been deprecated in favor or the new ruleNcssCount. - The PL/SQL rule
ExcessiveMethodLengthhas been deprecated. UseNcssCount
instead or create a custom XPath based rule using//(MethodDeclaration|ProgramUnit|TriggerTimingPointSection|TriggerUnit|TypeMethod)[@EndLine - @BeginLine > 100]. - The PL/SQL rule
ExcessiveObjectLengthhas been deprecated. UseNcssCount
instead or create a custom XPath based rule using//(PackageBody|PackageSpecification|ProgramUnit|TriggerUnit|TypeSpecification)[@EndLine - @BeginLine > 1000]. - The PL/SQL rule
ExcessivePackageBodyLengthhas been deprecated. UseNcssCount
instead or create a custom XPath based rule using//PackageBody[@EndLine - @BeginLine > 1000]. - The PL/SQL rule
ExcessivePackageSpecificationLengthhas been deprecated. UseNcssCount
instead or create a custom XPath based rule using//PackageSpecification[@EndLine - @BeginLine > 1000]. - The PL/SQL rule
ExcessiveTypeLengthhas been deprecated. UseNcssCount
instead or create a custom XPath based rule using//TypeSpecification[@EndLine - @BeginLine > 1000]. - The PL/SQL rules
NcssMethodCountandNcssObjectCounthave been
deprecated in favor of the new ruleNcssCount.
🐛️ 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
- java-bestpractices
- 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
- 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
- core
net.sourceforge.pmd.lang.symboltable: All classes in this package are deprecated.
The symbol table and type resolution implementation for Java has been rewritten from scratch
for PMD 7.0.0. This package is the remains of the old symbol table API, that is only used by
PL/SQL. For PMD 8.0.0 all these classes will be removed from pmd-core.
- apex
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.18.0 (31-October-2025)
31-October-2025 - 7.18.0
The PMD team is pleased to announce PMD 7.18.0.
This is a minor release.
Table Of Contents
- 🚀️ New and noteworthy
- 🌟️ New and Changed Rules
- 🐛️ Fixed Issues
- 🚨️ API Changes
- ✨️ Merged pull requests
- 📦️ Dependency updates
- 📈️ Stats
🚀️ New and noteworthy
Build Requirement is Java 17
From now on, Java 17 or newer is required to build PMD. PMD itself still remains compatible with Java 8,
so that it still can be used in a pure Java 8 environment. This allows us to use the latest
checkstyle version during the build.
🌟️ New and Changed Rules
New Rules
- The new Java rule
IdenticalConditionalBranchesfinds conditional statements
that do the same thing when the condition is true and false. This is either incorrect or redundant. - The new Java rule
LabeledStatementfinds labeled statements in code.
Labels make control flow difficult to understand and should be avoided. By default, the rule allows labeled
loops (do, while, for). But it has a property to flag also those labeled loops. - The new Java rule
UnusedLabelfinds unused labels which are unnecessary and
only make the code hard to read. This new rule will be part of the quickstart ruleset.
Changed Rules
ConfusingTernaryhas a new propertynullCheckBranchto control, whether null-checks
should be allowed (the default case) or should lead to a violation.AvoidCatchingGenericExceptionis now configurable with the new propertytypesThatShouldNotBeCaught.⚠️ The rule has also been moved from category "Design" to category "Error Prone". If you are currently bulk-adding
all the rules from the "Design" category into your custom ruleset, then you need to add the rule explicitly
again (otherwise it won't be included anymore):<ruleref="category/java/errorprone.xml/AvoidCatchingGenericException" />
Deprecated Rules
- The Java rule
AvoidCatchingNPEhas been deprecated in favor of the updated ruleAvoidCatchingGenericException, which is now configurable. - The Java rule
AvoidCatchingThrowablehas been deprecated in favor of the updated ruleAvoidCatchingGenericException, which is now configurable.
🐛️ Fixed Issues
- general
- #4714: [core] Allow trailing commas in multivalued properties
- #5873: [ci] Run integration test with Java 25
- #6012: [pmd-rulesets] Rulesets should be in alphabetical order
- #6073: [doc] Search improvements
- #6097: [doc] Add PMD versions dropdown
- #6098: [doc] Add a copy URL button
- #6101: [doc] Highlight current header in TOC
- #6149: [doc] Reproducible Build Documentation is outdated - PMD is now built using Java 17
- #6150: [core] Reduce memory usage of CPD's MatchCollector
- apex
- #5935: [apex] @SuppressWarnings - allow whitespace around comma when suppressing multiple rules
- apex-design
- #6022: [apex] ExcessiveClassLength/ExcessiveParameterList include the metric in the message
- apex-documentation
- #6189: [apex] ApexDoc rule doesn't match published Salesforce ApexDoc specification
- java
- java-bestpractices
- #2928: [java] New rules about labeled statements
- #4122: [java] CheckResultSet false-positive with local variable
- #6124: [java] UnusedLocalVariable: fix false negatives in pattern matching
- #6169: [java] AvoidUsingHardCodedIP: violation message should mention the hard coded address
- #6171: [java] AvoidUsingHardCodedIP: fix false positive for IPv6
- java-codestyle
- #5919: [java] ClassNamingConventions: Include integration tests in testClassPattern by default
- #6004: [java] Make ConfusingTernary != null configurable
- #6029: [java] Fix UnnecessaryCast false-negative in method calls
- #6057: [java] ModifierOrder false positive on "abstract sealed class"
- #6079: [java] IdenticalCatchBranches: False negative for overriden method calls
- #6123: [java] UselessParentheses FP around switch expression
- #6131: [java] ModifierOrder: wrong enum values documented, indirectly causing xml parse errors
- java-design
- java-documentation
- java-errorprone
- #5042: [java] CloseResource false-positive on Pattern Matching with instanceof
- #5878: [java] DontUseFloatTypeForLoopIndices false-negative if variable is declared before loop
- #6038: [java] Merge AvoidCatchingNPE and AvoidCatchingThrowable into AvoidCatchingGenericException
- #6055: [java] UselessPureMethodCall false positive with AtomicInteger::getAndIncrement
- #6060: [java] UselessPureMethodCall false positive on ZipInputStream::getNextEntry
- #6075: [java] AssignmentInOperand false positive with lambda expressions
- #6083: [java] New rule IdenticalConditionalBranches
- java-multithreading
- #5880: [java] DoubleCheckedLocking is not detected if more than 1 assignment or more than 2 if statements
- java-performance
- #6172: [java] InefficientEmptyStringCheck should include String#strip
- java-security
- #6191: [java] HardCodedCryptoKey: NPE when constants from parent class are used
- plsql-design
- #6077: [plsql] Excessive*/Ncss*Count/NPathComplexity include the metric
🚨️ API Changes
Deprecations
- java
- The following methods have been deprecated. Due to refactoring of the internal base class, these methods are not
used anymore and are not required to be implemented anymore:
- The following methods have been deprecated. Due to refactoring of the internal base class, these methods are not
✨️ Merged pull requests
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.17.0 (12-September-2025)
12-September-2025 - 7.17.0
The PMD team is pleased to announce PMD 7.17.0.
This is a minor release.
Table Of Contents
🚀 New and noteworthy
✨ New Rules
This release brings several new rules for both Java and Apex. Please try them out
and submit feedback onour issue tracker!
- The new apex rule
AnnotationsNamingConventionsenforces that annotations
are used consistently in PascalCase.
The rule is referenced in the quickstart.xml ruleset for Apex. - The new java rule
TypeParameterNamingConventionsreplaces the now deprecated rule
GenericsNaming. The new rule is configurable and checks for naming conventions of type parameters in
generic types and methods. It can be configured via a regular expression.
By default, this rule uses the standard Java naming convention (single uppercase letter).
The rule is referenced in the quickstart.xml ruleset for Java. - The new java rule
OverrideBothEqualsAndHashCodeOnComparablefinds missinghashCode()and/orequals()methods on types that implementComparable. This is important if
instances of these classes are used in collections. Failing to do so can lead to unexpected behavior in sets
which then do not conform to theSetinterface. While theSetinterface relies onequals()to determine object equality, sorted sets likeTreeSetusecompareTo()instead. The same issue can arise when such objects are used
as keys in sorted maps.
This rule is very similar toOverrideBothEqualsAndHashcodewhich has always been
skippingComparableand only reports if one of the two methods is missing. The new rule will also report,
if both methods (hashCode and equals) are missing.
The rule is referenced in the quickstart.xml ruleset for Java. - The new java rule
UselessPureMethodCallfinds method calls of pure methods
whose result is not used. Ignoring the result of such method calls is likely as mistake as pure
methods are side effect free.
The rule is referenced in the quickstart.xml ruleset for Java. - The new java rule
RelianceOnDefaultCharsetfinds method calls that
depend on the JVM's default charset. Using these method without specifying the charset explicitly
can lead to unexpected behavior on different platforms. - Thew new java rule
VariableCanBeInlinedfinds local variables that are
immediately returned or thrown. This rule replaces the old ruleUnnecessaryLocalBeforeReturn
which only considered return statements. The new rule also finds unnecessary local variables
before throw statements.
The rule is referenced in the quickstart.xml ruleset for Java. - The new java rule
CollectionTypeMismatchdetects calls to
collection methods where we suspect the types are incompatible. This happens for instance
when you try to remove aStringfrom aCollection<Integer>: although it is allowed
to write this becauseremovetakes anObjectparameter, it is most likely a mistake.
This rule is referenced in the quickstart.xml ruleset for Java. - The new java rule
DanglingJavadocfinds Javadoc comments that
do not belong to a class, method or field. These comments are ignored by the Javadoc tool
and should either be corrected or removed.
The rule is referenced in the quickstart.xml ruleset for Java. - The new java rule
ModifierOrder(codestyle) finds incorrectly ordered modifiers
(e.g.,static publicinstead ofpublic static). It ensures modifiers appear in the correct order as
recommended by the Java Language Specification.
Deprecated Rules
- The java rule
GenericsNaminghas been deprecated for removal in favor
of the new ruleTypeParameterNamingConventions. - The java rule
AvoidLosingExceptionInformationhas been deprecated for removal
in favor of the new ruleUselessPureMethodCall. - The java rule
UselessOperationOnImmutablehas been deprecated for removal
in favor of the new ruleUselessPureMethodCall. - The java rule
UnnecessaryLocalBeforeReturnhas been deprecated for removal
in favor of the new ruleVariableCanBeInlined.
CPD: New Markdown Report Format
This PMD version ships with a simple Markdown based output format for CPD. It outputs all duplications
one after another including the code snippets as code blocks.
SeeReport formats for CPD.
🐛 Fixed Issues
- apex-codestyle
- #5650: [apex] New Rule: AnnotationsNamingConventions
- core
- java
- java-bestpractices
- #2186: [java] New Rule: RelianceOnDefaultCharset
- #4500: [java] AvoidReassigningLoopVariables - false negatives within for-loops and skip allowed
- #4770: [java] UnusedFormalParameter should ignore public constructor as same as method
- #5198: [java] CheckResultSet false-positive with local variable checked in a while loop
- java-codestyle
- #972: [java] Improve naming conventions rules
- #4916: [java] UseExplicitTypes: cases where 'var' should be unobjectionable
- #5601: [java] New Rule: ModifierOrder
- #5770: [java] New Rule: VariableCanBeInlined: Local variables should not be declared and then immediately returned or thrown
- #5922: [java] New Rule: TypeParameterNamingConventions
- #5948: [java] UnnecessaryBoxing false positive when calling
List.remove(int) - #5982: [java] More detailed message for the UselessParentheses rule
- java-design
- java-documentation
- #5916: [java] New Rule: DanglingJavadoc
- java-errorprone
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.16.0 (25-July-2025)
25-July-2025 - 7.16.0
The PMD team is pleased to announce PMD 7.16.0.
This is a minor release.
Table Of Contents
🚀 New and noteworthy
🚀 New: Java 25 Support
This release of PMD brings support for Java 25.
There are the following new standard language features:
- JEP 511: Module Import Declarations
- JEP 512: Compact Source Files and Instance Main Methods
- JEP 513: Flexible Constructor Bodies
And one preview language feature:
In order to analyze a project with PMD that uses these preview language features,
you'll need to enable it via the environment variablePMD_JAVA_OPTS and select the new language
version25-preview:
export PMD_JAVA_OPTS=--enable-previewpmd check --use-version java-25-preview ...Note: Support for Java 23 preview language features have been removed. The version "23-preview"
is no longer available.
New: CPD support for CSS
CPD now supports CSS (Cascading Style Sheets), a language for describing the rendering of structured
documents (such as HTML) on screen, on paper etc.
It is shipped with the new modulepmd-css.
✨ New Rules
- Two new rules have been added to Java's Error Prone category:
ReplaceJavaUtilCalendar
andReplaceJavaUtilDate. These rules help to migrate away from old Java APIs aroundjava.util.Calendarandjava.util.Date. It is recommended to use the modernjava.timeAPI instead, which
is available since Java 8.
🐛 Fixed Issues
- core
- java
- java-codestyle
- #5892: [java] ShortVariable false positive for java 22 unnamed variable
_
- #5892: [java] ShortVariable false positive for java 22 unnamed variable
- java-design
- #5858: [java] FinalFieldCouldBeStatic false positive for array initializers
- java-errorprone
- #2862: [java] New Rules: Avoid java.util.Date and Calendar classes
🚨 API Changes
Experimental APIs that are now considered stable
- pmd-java
ASTImportDeclaration#isModuleImportis now stable API.ASTCompilationUnit#isCompactis now stable API. Note, it was previously
calledisSimpleCompilationUnit.ASTImplicitClassDeclarationis now stable API.JavaVisitorBase#visit(ASTImplicitClassDeclaration, P)is now
stable API.
✨ Merged pull requests
- #5733: [css] Add new CPD language -Thomas Prouvot (@tprouvot)
- #5859: Fix#5858: [java] Fix false positive in FinalFieldCouldBeStatic for array initializers -Zbynek Konecny (@zbynek)
- #5872: [java] Add Support for Java 25 -Andreas Dangel (@adangel)
- #5876: chore: license header cleanup -Andreas Dangel (@adangel)
- #5883: Fix#2862: [java] Add rules discouraging the use of java.util.Calendar and java.util.Date -UncleOwen (@UncleOwen)
- #5893: chore: Fix Mockito javaagent warning for Java 21+ -Andreas Dangel (@adangel)
- #5894: chore: Fix JUnit warning about invalid test factory -Andreas Dangel (@adangel)
- #5895: Fix#5597: Move dogfood profile to separate settings.xml -Andreas Dangel (@adangel)
- #5899: Fix#5344: [java] Just log invalid annotation target type -Andreas Dangel (@adangel)
- #5909: [ci] Create a pre-release for snapshot builds -Andreas Dangel (@adangel)
- #5911: [doc] Reference CPD Capable Languages in CPD CLI docu -Andreas Dangel (@adangel)
- #5914: Fix#5892: [java] ShortVariable FP for java 22 Unnamed Variable -Lukas Gräf (@lukasgraef)
- #5918: chore: [cli] Improve symbolic link tests for Windows -Andreas Dangel (@adangel)
- #5920: chore: [scala] Fix javadoc config -Andreas Dangel (@adangel)
📦 Dependency updates
- #5857: Bump PMD from 7.14.0 to 7.15.0
- #5861: Bump scalameta.version from 4.13.7 to 4.13.8
- #5862: Bump com.puppycrawl.tools:checkstyle from 10.25.1 to 10.26.1
- #5863: Bump org.apache.maven.plugins:maven-pmd-plugin from 3.26.0 to 3.27.0
- #5864: Bump kotlin.version from 1.9.24 to 2.2.0
- #5865: Bump org.junit:junit-bom from 5.13.1 to 5.13.2
- #5866: Bump org.jsoup:jsoup from 1.20.1 to 1.21.1
- #5884: Bump org.junit:junit-bom from 5.13.2 to 5.13.3
- #5885: Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.7 to 3.2.8
- #5886: Bump org.checkerframework:checker-qual from 3.49.4 to 3.49.5
- #5889: Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.5.0 to 3.6.0
- #5900: Bump org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0
- #5901: Bump io.github.apex-dev-tools:apex-parser from 4.4.0 to 4.4.1
- #5902: Bump log4j.version from 2.25.0 to 2.25.1
- #5910: Bump maven from 3.9.10 to 3.9.11
- #5921: Bump build-tools from 32 to 33
- #5926: chore(deps): bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.0 to 3.6.1
- #5927: chore(deps): bump ostruct from 0.6.2 to 0.6.3 in /.ci/files in the all-gems group across 1 directory
- #5928: chore(deps): bump marocchino/sticky-pull-request-comment from 2.9.3 to 2.9.4 in the all-actions group
- #5929: chore(deps): Update gems
📈 Stats
- 100 commits
- 21 closed tickets & PRs
- Days since last release: 27
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.15.0 (27-June-2025)
27-June-2025 - 7.15.0
The PMD team is pleased to announce PMD 7.15.0.
This is a minor release.
Table Of Contents
- 🚀 New and noteworthy
- 🐛 Fixed Issues
- 🚨 API Changes
- 💵 Financial Contributions
- ✨ Merged pull requests
- 📦 Dependency updates
- 📈 Stats
🚀 New and noteworthy
✨ New Rules
- The new Apex rule
AvoidBooleanMethodParametersfinds methods that take a
boolean parameter. This can make method calls difficult to understand and maintain as the method is clearly
doing two things.
🐛 Fixed Issues
- apex-design
- #5427: [apex] New Rule: Avoid Boolean Method Parameters
- apex-security
- #5788: [apex] ApexCRUDViolation unable to detect insecure SOQL if it is a direct input argument
- doc
- #5790: [doc] Website rule reference pages are returning 404
- java-bestpractices
- java-codestyle
- java-design
- #5804: [java] UselessOverridingMethod doesn't play well with UnnecessarySuppressWarning
🚨 API Changes
Rule Test Schema
The rule test schema has been extended to support verifying suppressed violations.
SeeTesting your rules for more information.
Also note, the schemarule-tests.xsd
is now only in the module "pmd-test-schema". It has been removed from the old location from module "pmd-test".
💵 Financial Contributions
Many thanks to our sponsors:
✨ Merged pull requests
- #5738: chore: Remove unused private methods in test classes -Pankraz76 (@Pankraz76)
- #5745: [ci] New "Publish Release" workflow -Andreas Dangel (@adangel)
- #5791: [doc] Add a simple check whether generate rule doc pages exist -Andreas Dangel (@adangel)
- #5797: [doc] Update sponsors -Andreas Dangel (@adangel)
- #5800: Fix#5793: [java] NonExhaustiveSwitch should ignore "case null" -Andreas Dangel (@adangel)
- #5803: chore: Remove unnecessary suppress warnings -Andreas Dangel (@adangel)
- #5805: Fix#5804: [java] UselessOverridingMethod needs to ignore SuppressWarnings -Andreas Dangel (@adangel)
- #5806: [test] Verify suppressed violations in rule tests -Andreas Dangel (@adangel)
- #5814: Fix#5788: [apex] ApexCRUDViolation - consider deeper nested Soql -Andreas Dangel (@adangel)
- #5815: Fix#5785: [java] UnusedPrivateField should ignore SuppressWarnings -Andreas Dangel (@adangel)
- #5818: Fix#2304: [java] UnnecessaryImport FP for on-demand imports in JavaDoc -Lukas Gräf (@lukasgraef)
- #5821: [apex] New Rule: Avoid boolean method parameters -Mitch Spano (@mitchspano)
- #5823: [doc] Fix javadoc plugin configuration -Andreas Dangel (@adangel)
- #5833: Fix#1639#5832: Use filtered comment text for UnnecessaryImport -Andreas Dangel (@adangel)
- #5851: chore: [java] ReplaceHashtableWithMap: Fix name of test -UncleOwen (@UncleOwen)
📦 Dependency updates
- #5775: Bump PMD from 7.13.0 to 7.14.0
- #5778: Bump the all-gems group across 2 directories with 3 updates
- #5779: Bump org.codehaus.mojo:exec-maven-plugin from 3.5.0 to 3.5.1
- #5780: Bump org.apache.maven.plugins:maven-clean-plugin from 3.4.1 to 3.5.0
- #5781: Bump com.google.protobuf:protobuf-java from 4.31.0 to 4.31.1
- #5782: Bump org.apache.groovy:groovy from 4.0.26 to 4.0.27
- #5783: Bump com.puppycrawl.tools:checkstyle from 10.24.0 to 10.25.0
- #5784: Bump org.junit:junit-bom from 5.12.2 to 5.13.0
- #5807: Bump maven from 3.9.8 to 3.9.10
- #5809: Bump org.codehaus.mojo:build-helper-maven-plugin from 3.6.0 to 3.6.1
- #5810: Bump org.junit:junit-bom from 5.13.0 to 5.13.1
- #5811: Bump junit5.platform.version from 1.13.0 to 1.13.1
- #5812: Bump org.checkerframework:checker-qual from 3.49.3 to 3.49.4
- #5813: Bump the all-gems group across 2 directories with 1 update
- #5828: Bump scalameta.version from 4.13.6 to 4.13.7
- #5829: Bump liquid from 5.8.6 to 5.8.7 in /.ci/files in the all-gems group across 1 directory
- #5838: Bump marocchino/sticky-pull-request-comment from 2.9.2 to 2.9.3 in the all-actions group
- #5839: Bump log4j.version from 2.24.3 to 2.25.0
- #5840: Bump com.puppycrawl.tools:checkstyle from 10.25.0 to 10.25.1
- #5841: Bump net.bytebuddy:byte-buddy-agent from 1.17.5 to 1.17.6
- #5842: Bump net.bytebuddy:byte-buddy from 1.17.5 to 1.17.6
- #5843: Bump org.sonatype.central:central-publishing-maven-plugin from 0.7.0 to 0.8.0
- #5844: Bump ostruct from 0.6.1 to 0.6.2 in /.ci/files in the all-gems group across 1 directory
- #5853: Bump build-tools from 30 to 32
📈 Stats
- 91 commits
- 24 closed tickets & PRs
- Days since last release: 27
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.14.0 (30-May-2025)
30-May-2025 - 7.14.0
The PMD team is pleased to announce PMD 7.14.0.
This is a minor release.
Table Of Contents
🚀 New and noteworthy
PMD CLI now uses threaded execution by default
In the PMD CLI, the--threads (-t) option can now accept a thread
count given relative to the number of cores of the machine. For instance,
it is now possible to write-t 1C to spawn one thread per core, or-t 0.5C
to spawn one thread for every other core.
The thread count option now defaults to1C, meaning parallel execution
is used by default. You can disable this by using-t 1.
New Rule UnnecessaryWarningSuppression (experimental)
This new Java ruleUnnecessaryWarningSuppression reports unused suppression
annotations and comments. Violations of this rule cannot be suppressed.
How to use it? Just include it in your ruleset:
<ruleref="category/java/bestpractices.xml/UnnecessaryWarningSuppression" />
Note: This rule is currently experimental. It is available for now only for Java.
The rule for now only reports annotations specific to PMD, like@SuppressWarnings("PMD").
In the future we might be able to check for other common ones like@SuppressWarnings("unchecked") or"fallthrough".
Since violations of this rule cannot be suppressed, we opted here on the side of false-negatives and
don't report every unused case yet.
However, suppressing specific PMD rules is working as expected.
Migrating to Central Publisher Portal
We've now migrated toCentral Publisher Portal.
Snapshots of PMD are still available, however the repository URL changed. To consume these with maven, you can
use the following snippet:
<repositories> <repository> <name>Central Portal Snapshots</name> <id>central-portal-snapshots</id> <url>https://central.sonatype.com/repository/maven-snapshots/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository></repositories>
Releases of PMD are available onMaven Central as before without change.
More CLI parameters shared between PMD and CPD
When executing PMD or CPD, the same parameters are now understood for selecting which files should
be analyzed. SeeFile collection options
for a list of common, shared parameters that are valid for both commands.
🐛 Fixed Issues
- core
- java-bestpractices
- java-codestyle
- java-design
- java-errorprone
- #5702: [java] InvalidLogMessageFormat: Lombok @Slf4j annotation is not interpreted by PMD
- java-performance
- #5711: [java] UseArraysAsList false positive with Sets
- visualforce
- #5476: [visualforce] NPE when analyzing standard field references in visualforce page
🚨 API Changes
CLI
- CPD now supports
--report-file(-r) and--exclude-file-list. - PMD now supports
--excludeand--non-recursive. - The option
--ignore-listin PMD is renamed to--exclude-file-list.
Deprecations
- CLI
- The option
--ignore-listhas been deprecated. Use--exclude-file-listinstead.
- The option
- core
AstInfo#getSuppressionComments: UsegetAllSuppressionComments
orgetSuppressionComment.AstInfo#withSuppressMap: UsewithSuppressionCommentsAbstractTokenManager#suppressMap: Don't use this map directly anymore. Instead,
usegetSuppressionComments.AbstractTokenManager#getSuppressMap: UsegetSuppressionCommentsinstead.
- pmd-java
ASTCompactConstructorDeclaration#getDeclarationNode: This method just returnsthisand isn't useful.JavaMetrics#NPATH: UseNPATH_COMP, which is available on more nodes,
and uses Long instead of BigInteger.
Experimental
- core
- pmd-java
✨ Merged pull requests
- #5584: [ci] New workflow "Publish Snapshot" -Andreas Dangel (@adangel)
- #5599: [java] Rewrite NPath complexity metric -Clément Fournier (@oowekyala)
- #5609: [core] Add rule to report unnecessary suppression comments/annotations -Clément Fournier (@oowekyala)
- #5699: Fix#5702: [java] First-class support for lombok @Slf4j -Clément Fournier (@oowekyala)
- #5700: [core] Don't accidentally catch unexpected r...
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.13.0 (25-April-2025)
25-April-2025 - 7.13.0
The PMD team is pleased to announce PMD 7.13.0.
This is a minor release.
Table Of Contents
🚀 New and noteworthy
Docker images
PMD is now providing official docker images athttps://hub.docker.com/r/pmdcode/pmd and
https://github.com/pmd/docker/pkgs/container/pmd.
You can now analyze your code with PMD by using docker like so:
docker run --rm --tty -v $PWD:/src pmdcode/pmd:latest check -d . -R rulesets/java/quickstart.xml`More information is available athttps://github.com/pmd/docker.
Experimental support for language dialects
A dialect is a particular form of another supported language. For example, an XSLT is a particular
form of an XML. Even though the dialect has its own semantics and uses, the contents are still readable
by any tool capable of understanding the base language.
In PMD, a dialect allows to set up completely custom rules, XPath functions, properties and metrics
for these files; while retaining the full support of the underlying base language including
already existing rules and XPath functions.
See[core] Support language dialects #5438 and
Adding a new dialect for more information.
✨ New Rules
- The new Apex rule
TypeShadowsBuiltInNamespacefinds Apex classes, enums, and interfaces
that have the same name as a class, enum, or interface in theSystemorSchemanamespace.
Shadowing these namespaces in this way can lead to confusion and unexpected behavior.
🐛 Fixed Issues
- core
- apex-bestpractices
- #5667: [apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative when seeAllData parameter is a string
- apex-errorprone
- #3184: [apex] Prevent classes from shadowing System Namespace
- java
- #5645: [java] Parse error on switch with yield
- java-bestpractices
- #5687: [java] UnusedPrivateMethodRule: exclude serialization method readObjectNoData()
- plsql
- #5675: [plsql] Parse error with TREAT function
🚨 API Changes
Deprecations
net.sourceforge.pmd.lang.xml.pom.PomLanguageModuleis deprecated. POM is now a dialect of XML.
UsePomDialectModuleinstead.net.sourceforge.pmd.lang.xml.wsdl.WsdlLanguageModuleis deprecated. WSDL is now a dialect of XML.
UseWsdlDialectModuleinstead.net.sourceforge.pmd.lang.xml.xsl.XslLanguageModuleis deprecated. XSL is now a dialect of XML.
UseXslDialectModuleinstead.
Experimental API
- The core API around support for language dialects:
✨ Merged pull requests
- #5438: [core] Support language dialects -Juan Martín Sotuyo Dodero (@jsotuyod)
- #5450: Fix#3184: [apex] New Rule: TypeShadowsBuiltInNamespace -Mitch Spano (@mitchspano)
- #5573: Fix#5525: [core] Add Sarif Level Property -julees7 (@julees7)
- #5623: [dist] Make pmd launch script compatible with /bin/sh -Clément Fournier (@oowekyala)
- #5648: Fix#5645: [java] Parse error with yield statement -Clément Fournier (@oowekyala)
- #5652: [java] Cleanup
AccessorClassGenerationRuleimplementation -Pankraz76 (@Pankraz76) - #5672: [doc] Fix its/it's and doable/double typos -John Jetmore (@jetmore)
- #5674: Fix#5448: [ci] Maintain public Docker image -Andreas Dangel (@adangel)
- #5684: Fix#5667: [apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative when seeAllDate parameter is a string -Thomas Prouvot (@tprouvot)
- #5685: [doc] typo fix in PMD Designer reference -Douglas Griffith (@dwgrth)
- #5686: Fix#5675: [plsql] Support TREAT function with specified datatype -Andreas Dangel (@adangel)
- #5687: [java] UnusedPrivateMethodRule: exclude serialization method readObjectNoData() -Gili Tzabari (@cowwoc)
- #5688: [java] Fix Double Literal for Java19+ compatibility -Andreas Dangel (@adangel)
📦 Dependency updates
- #5607: Bump org.junit:junit-bom from 5.11.4 to 5.12.1
- #5641: Bump PMD from 7.11.0 to 7.12.0
- #5653: Bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.0.0.4389 to 5.1.0.4751
- #5654: Bump surefire.version from 3.5.2 to 3.5.3
- #5655: Bump com.google.guava:guava from 33.4.5-jre to 33.4.6-jre
- #5656: Bump org.ow2.asm:asm from 9.7.1 to 9.8
- #5657: Bump com.google.protobuf:protobuf-java from 4.30.1 to 4.30.2
- #5658: Bump logger from 1.6.6 to 1.7.0 in /.ci/files in the all-gems group across 1 directory
- #5671: Bump checkstyle from 10.21.4 to 10.23.0
- #5676: Bump org.checkerframework:checker-qual from 3.49.1 to 3.49.2
- #5677: Bump junit5.platform.version from 1.12.1 to 1.12.2
- #5678: Bump org.apache.commons:commons-text from 1.13.0 to 1.13.1
- #5679: Bump com.google.guava:guava from 33.4.6-jre to 33.4.7-jre
- #5680: Bump org.mockito:mockito-core from 5.16.1 to 5.17.0
- #5681: Bump org.jacoco:jacoco-maven-plugin from 0.8.12 to 0.8.13
- [#5682](#5...
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.12.0 (28-March-2025)
28-March-2025 - 7.12.0
The PMD team is pleased to announce PMD 7.12.0.
This is a minor release.
Table Of Contents
🚀 New and noteworthy
✨ New Rules
- The new Java rule
ImplicitFunctionalInterfacereports functional interfaces that were
not explicitly declared as such with the annotation@FunctionalInterface. If an interface is accidentally a functional
interface, then it should bear a@SuppressWarnings("PMD.ImplicitFunctionalInterface")
annotation to make this clear.
🐛 Fixed Issues
- core
- #5593: [core] Make renderers output files in deterministic order even when multithreaded
- apex
- #5567: [apex] Provide type information for CastExpression
- apex-design
- #5616: [apex] ExcessiveParameterList reports entire method instead of signature only
- java
- #5587: [java] Thread deadlock during PMD analysis in ParseLock.getFinalStatus
- java-bestpractices
- java-codestyle
- plsql
🚨 API Changes
Deprecations
- java
- The method
buildConstValueis deprecated for removal. It should
have been package-private from the start. In order to get the (compile time) const value of an expression, usegetConstValueorgetConstFoldingResult
instead. - For the same reason, the following methods are also deprecated for removal:
buildConstValueandbuildConstValue.
- The method
JTypeVar#withUpperboundis deprecated. It was previously meant to be used
internally and not needed anymore.
✨ Merged pull requests
- #5550: Fix#5521: [plsql] Improve parser performance by reducing lookaheads -Andreas Dangel (@adangel)
- #5554: Fix#5369: [java] Consider that lombok.val and var are inferred -Clément Fournier (@oowekyala)
- #5555: Fix#2849: [java] Add rule ImplicitFunctionalInterface -Clément Fournier (@oowekyala)
- #5556: [ci] New workflow "Publish Results from Pull Requests" -Andreas Dangel (@adangel)
- #5574: Fix#5567: [apex] Provide type info for CastExpression -Andreas Dangel (@adangel)
- #5583: [java] Fix race condition in ClassStub for inner classes -Andreas Dangel (@adangel)
- #5586: [java/core] Micro optimizations -Clément Fournier (@oowekyala)
- #5588: [java] Fix crash when parsing class for anonymous class -Clément Fournier (@oowekyala)
- #5591: Fix#5587: [java] Fix deadlock while loading ClassStub -Clément Fournier (@oowekyala)
- #5593: [core] Make renderers output files in deterministic order even when multithreaded -Clément Fournier (@oowekyala)
- #5595: Fix#5590: [java] LiteralsFirstInComparisons with constant field -Clément Fournier (@oowekyala)
- #5596: Fix#4441: [plsql] XMLQuery - Support identifier as XQuery_string parameter -Andreas Dangel (@adangel)
- #5598: Fix#5592: [java] Fix UnusedAssignment FP with compact record ctor -Clément Fournier (@oowekyala)
- #5600: Fix#5079: [java] LocalVariableCouldBeFinal false-positive with lombok.val -Clément Fournier (@oowekyala)
- #5611: Fix#5452: [java] PackageCase reported on wrong line -Clément Fournier (@oowekyala)
- #5617: Fix#5616: [apex] ExcessiveParameterList: Report only method signature -Andreas Dangel (@adangel)
- #5618: [doc] Fix search index -Andreas Dangel (@adangel)
📦 Dependency updates
- #5558: Bump PMD from 7.10.0 to 7.11.0
- #5561: Bump org.apache.groovy:groovy from 4.0.25 to 4.0.26
- #5562: Bump org.junit.platform:junit-platform-suite from 1.11.4 to 1.12.0
- #5564: Bump org.apache.maven.plugins:maven-clean-plugin from 3.4.0 to 3.4.1
- #5565: Bump org.apache.maven.plugins:maven-deploy-plugin from 3.1.3 to 3.1.4
- #5566: Bump io.github.apex-dev-tools:apex-ls_2.13 from 5.7.0 to 5.8.0
- #5571: Bump nokogiri from 1.16.7 to 1.18.3
- #5572: Bump uri from 0.13.1 to 1.0.3
- #5575: Bump org.jsoup:jsoup from 1.18.3 to 1.19.1
- #5576: Bump scalameta.version from 4.13.2 to 4.13.3
- #5577: Bump org.yaml:snakeyaml from 2.3 to 2.4
- #5578: Bump com.google.protobuf:protobuf-java from 4.29.3 to 4.30.0
- #5580: Bump net.bytebuddy:byte-buddy from 1.17.1 to 1.17.2
- #5581: Bump com.puppycrawl.tools:checkstyle from 10.21.3 to 10.21.4
- #5582: Bump the gems liquid to 5.8.1 and logger to 1.6.6
- #5602: Bump org.apache.maven.plugins:maven-install-plugin from 3.1.3 to 3.1.4
- #5603: Bump net.bytebuddy:byte-buddy-agent from 1.17.1 to 1.17.2
- #5604: Bump org.mockito:mockito-core from 5.15.2 to 5.16.1
- #5605: Bump org.junit.platform:junit-platform-suite from 1.12.0 to 1.12.1
- #5606: Bump org.checkerframework:checker-qual from 3.49.0 to 3.49.1
- #5608: Bump com.google.protobuf:protobuf-java from 4.30.0 to 4.30.1
- #5619: Bump nokogiri from 1.18.3 to 1.18.5
- #5624: Bump scalameta.version from 4.13.3 to 4.13.4
- #5627: Bump net.bytebuddy:byte-buddy-agent from 1.17.2 to 1.17.4
- #5628: Bump io.github.apex-dev-tools:apex-ls_2.13 from 5.8.0 to 5.9.0
- #5629: Bump com.google.guava:guava from 33.4.0-jre to 33.4.5-jre
- #5630: Bump net.bytebuddy:byte-buddy from 1.17.2 to 1.17.4
📈 Stats
Assets10
Uh oh!
There was an error while loading.Please reload this page.
PMD 7.11.0 (28-February-2025)
28-February-2025 - 7.11.0
The PMD team is pleased to announce PMD 7.11.0.
This is a minor release.
Table Of Contents
🚀 New and noteworthy
✨ New Rules
- The new Apex rule
AvoidStatefulDatabaseResultdetectsDatabase.Statefulimplementations
that store database results in instance variables. This can cause serialization issues between successive batch
iterations.
Signed Releases
We now not only sign the maven artifacts, but also our binary distribution files that you can
download fromGitHub Releases.
See the pageSigned Releases in our documentation for how to verify the files.
🐛 Fixed Issues
- apex-errorprone
- #5305: [apex] New Rule: Avoid Stateful Database Results
- java
- java-bestpractices
- java-codestyle
- #4822: [java] UnnecessaryCast false-positive for raw types
- #5073: [java] UnnecessaryCast false-positive for cast in return position of lambda
- #5440: [java] UnnecessaryCast reported in stream chain map() call that casts to more generic interface
- #5523: [java] UnnecessaryCast false-positive for integer operations in floating-point context
- #5541: [java] Fix IdenticalCatchBranch reporting branches that call different overloads
- java-design
- #5018: [java] FinalFieldCouldBeStatic false-positive for access of super class field
- plsql
- #5522: [plsql] Parse error for operator in TRIM function call
🚨 API Changes
Deprecations
- java
- The method
TypeOps#isContextDependent(JMethodSig)is deprecated for removal.
UseisContextDependent(JExecutableSymbol)instead which
is more flexible.
- The method
✨ Merged pull requests
- #5425: [apex] New Rule: Avoid Stateful Database Results -Mitch Spano (@mitchspano)
- #5491: [docs] Call render_release_notes.rb within docs -Andreas Dangel (@adangel)
- #5492: [docs] Add security page with known vulnerabilities -Andreas Dangel (@adangel)
- #5503: [java] AvoidSynchronizedAtMethodLevel: Fixed error in code example -Balazs Glatz (@gbq6)
- #5507: Fix#5486: [java] Fix UnusedPrivateMethod - always search decls in current AST -Andreas Dangel (@adangel)
- #5508: Fix#3359: [java] UnusedPrivateMethod: Ignore lombok.EqualsAndHashCode.Include -Andreas Dangel (@adangel)
- #5510: [ci] Add signed releases -Andreas Dangel (@adangel)
- #5524: [ci] New optimized workflow for pull requests -Andreas Dangel (@adangel)
- #5526: Fix#5523: [java] UnnecessaryCast FP with integer division -Clément Fournier (@oowekyala)
- #5527: Fix#5522: [plsql] Allow arbitrary expressions for TRIM -Andreas Dangel (@adangel)
- #5528: Fix#5442: [java] Fix stackoverflow with recursive generic types -Clément Fournier (@oowekyala)
- #5529: Fix#5493: [java] IllegalArgumentException with wildcard bound -Clément Fournier (@oowekyala)
- #5530: Fix#5073: [java] UnnecessaryCast FP with lambdas -Clément Fournier (@oowekyala)
- #5537: Fix#5504: [java] UnusedAssignment FP with continue in foreach loop -Clément Fournier (@oowekyala)
- #5538: Add project icon for IntelliJ IDEA -Vincent Potucek (@pankratz227)
- #5539: [plsql] Add OracleDBUtils as regression testing project -Andreas Dangel (@adangel)
- #5541: [java] Fix IdenticalCatchBranch reporting branches that call different overloads -Clément Fournier (@oowekyala)
- #5542: Add GitHub issue links in IDEA git log -Andreas Dangel (@adangel)
- #5544: [javacc] Move grammar files into src/main/javacc -Andreas Dangel (@adangel)
- #5551: [doc] Update contributors for 7.11.0 -Andreas Dangel (@adangel)
- #5552: Fix#4822: [java] UnnecessaryCast FP with unchecked cast -Clément Fournier (@oowekyala)
- #5553: Fix#5018: [java] FinalFieldCouldBeStatic FP with super field access -Clément Fournier (@oowekyala)
📦 Dependency updates
- #5490: Bump PMD from 7.9.0 to 7.10.0
- #5494: Bump liquid from 5.7.1 to 5.7.2 in the all-gems group across 1 directory
- #5497: Bump net.bytebuddy:byte-buddy-agent from 1.16.1 to 1.17.0
- #5498: Bump org.assertj:assertj-core from 3.25.3 to 3.27.3
- #5499: Bump org.mockito:mockito-core from 5.14.2 to 5.15.2
- #5500: Bump org.junit:junit-bom from 5.11.2 to 5.11.4
- #5501: Bump org.scala-lang:scala-reflect from 2.13.15 to 2.13.16
- #5516: Bump org.jetbrains:annotations from 26.0.1 to 26.0.2
- #5517: Bump net.bytebuddy:byte-buddy from 1.15.11 to 1.17.0
- #5518: Bump org.junit.platform:junit-platform-suite from 1.11.3 to 1.11.4
- #5519: Bump org.checkerframework:checker-qual from 3.48.3 to 3.49.0
- #5520: Bump com.google.guava:guava from 33.0.0-jre to 33.4.0-jre
- #5532: Bump net.bytebuddy:byte-buddy-agent from 1.17.0 to 1.17.1
- #5533: Bump log4j.version from 2.24.2 to 2.24.3
- #5534: Bump com.google.code.gson:gson from 2.11.0 to 2.12.1
- #5535: Bump scalameta.version from 4.12.7 to 4.13.1.1
- #5536: Bump org.apache.groovy:groovy from 4.0.24 to 4.0.25
- #5545: Bump commons-logging:commons-logging from 1.3.4 to 1.3.5
- #5546: Bump scalameta.version from 4.13.1.1 to 4.13.2
- #5547: Bump net.bytebuddy:byte-buddy from 1.17.0 to 1.17.1
- #5548: Bump com.puppycrawl.tools:checkstyle from 10.21.2 to 10.21.3
- #5549: Bump org.apache.maven.plugins:maven-compiler-plugin from 3.13.0 to 3.14.0
📈 Stats
- 97 commits
- 35 closed tickets & PRs
...
Assets10
Uh oh!
There was an error while loading.Please reload this page.