PMD 7.20.0 released
30 December 2025
30-December-2025 - 7.20.0
The PMD team is pleased to announce PMD 7.20.0.
This is a minor release.
Table Of Contents
🌟️ Changed Rules
- The Java rule
OnlyOneReturn has a new property ignoredMethodNames. This property by
default is set to compareTo and equals, thus this rule now by default allows multiple return statements
for these methods. To restore the old behavior, simply set this property to an empty value.
🐛️ Fixed Issues
- core
- #6330: [core] “Unable to create ValueRepresentation” when using @LiteralText (XPath)
- java
- #6234: [java] Parser fails to parse switch expressions in super() constructor calls
- #6299: [java] Fix grammar of switch label
- java-bestpractices
- #4282: [java] GuardLogStatement: False positive when guard is not a direct parent
- #6028: [java] UnusedPrivateMethod: False positive with raw type for generic method
- #6257: [java] UnusedLocalVariable: False positive with instanceof pattern guard
- #6291: [java] EnumComparison: False positive for any object when object.equals(null)
- #6328: [java] UnusedLocalVariable: False positive for pattern variable in for-each without braces
- java-codestyle
- #4257: [java] OnlyOneReturn: False positive with equals method
- #5043: [java] LambdaCanBeMethodReference: False positive on overloaded methods
- #6237: [java] UnnecessaryCast: ContextedRuntimeException when parsing switch expression with lambdas
- #6279: [java] EmptyMethodInAbstractClassShouldBeAbstract: False positive for final empty methods
- #6284: [java] UnnecessaryConstructor: False positive for JavaDoc-bearing constructor
- java-errorprone
- #6276: [java] NullAssignment: False positive when assigning null to a final field in a constructor
- #6343: [java] MissingStaticMethodInNonInstantiatableClass: False negative when method in nested class returns null
- java-performance
- #4158: [java] BigIntegerInstantiation: False negative with compile-time constant
- #4910: [java] ConsecutiveAppendsShouldReuse: False positive within if-statement without curly braces
- #5877: [java] AvoidArrayLoops: False negative when break inside switch statement
- maintenance
- #6230: [core] Single module snapshot build fails
🚨️ API Changes
Experimental API
✨️ Merged pull requests
- #6262: [java] UnusedLocalVariable: fix false positive with guard in switch - Zbynek Konecny (@zbynek)
- #6285: [java] Fix #5043: FP in LambdaCanBeMethodReference when method ref would be ambiguous - Clément Fournier (@oowekyala)
- #6287: [doc] Explain how to build or pull snapshot dependencies for single module builds - Marcel (@mrclmh)
- #6288: [java] Fix #6279: EmptyMethodInAbstractClassShouldBeAbstract should ignore final methods - Marcel (@mrclmh)
- #6292: [java] Fix #6291: EnumComparison FP when comparing with null - Clément Fournier (@oowekyala)
- #6293: [java] Fix #6276: NullAssignment should not report assigning null to a final field in a constructor - Lukas Gräf (@lukasgraef)
- #6294: [java] Fix #6028: UnusedPrivateMethod FP - Clément Fournier (@oowekyala)
- #6295: [java] Fix #6237: UnnecessaryCast error with switch expr returning lambdas - Clément Fournier (@oowekyala)
- #6296: [java] Fix #4282: GuardLogStatement only detects guard methods immediately around it - Marcel (@mrclmh)
- #6299: [java] Fix grammar of switch label - Clément Fournier (@oowekyala)
- #6309: [java] Fix #4257: Allow ignoring methods in OnlyOneReturn - Marcel (@mrclmh)
- #6311: [java] Fix #6284: UnnecessaryConstructor reporting false-positive on JavaDoc-bearing constructor - Marcel (@mrclmh)
- #6313: [java] Fix #4910: if-statement triggers ConsecutiveAppendsShouldReuse - Marcel (@mrclmh)
- #6316: [java] Fix #5877: AvoidArrayLoops false-negative when break inside switch statement - Marcel (@mrclmh)
- #6342: [core] Fix #6330: Cannot access Chars attribute from XPath - Clément Fournier (@oowekyala)
- #6344: [java] Fix #6328: UnusedLocalVariable should consider pattern variable in for-each without curly braces - Mohamed Hamed (@mdhamed238)
- #6348: [jsp] Fix malformed Javadoc HTML in JspDocStyleTest - Gianmarco (@gianmarcoschifone)
- #6359: [java] Fix #6234: Parser fails to parse switch expressions in super() constructor calls - Mohamed Hamed (@mdhamed238)
- #6360: [java] Fix #4158: BigIntegerInstantiation false-negative with compile-time constant - Lukas Gräf (@lukasgraef)
- #6361: [vf] Fix invalid Javadoc syntax in VfDocStyleTest - Gianmarco (@gianmarcoschifone)
- #6363: [apex] Add sca-extra ruleset for Salesforce Apex testing - Beech Horn (@metalshark)
📦️ Dependency updates
- #6286: Bump PMD from 7.18.0 to 7.19.0
- #6300: chore(deps): bump actions/checkout from 6.0.0 to 6.0.1
- #6301: chore(deps): bump org.checkerframework:checker-qual from 3.52.0 to 3.52.1
- #6302: chore(deps): bump org.apache.maven.plugins:maven-resources-plugin from 3.3.1 to 3.4.0
- #6303: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.1 to 1.18.2
- #6304: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.1.2 to 12.2.0
- #6305: chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.3.0.6276 to 5.4.0.6343
- #6306: chore(deps): bump webrick from 1.9.1 to 1.9.2 in /docs
- #6318: chore(deps): bump actions/create-github-app-token from 2.2.0 to 2.2.1
- #6319: chore(deps): bump actions/setup-java from 5.0.0 to 5.1.0
- #6320: chore(deps): bump ruby/setup-ruby from 1.268.0 to 1.269.0
- #6321: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.1 to 1.18.2
- #6323: chore(deps): bump com.google.protobuf:protobuf-java from 4.33.1 to 4.33.2
- #6324: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 6.0.1 to 6.0.2
- #6325: chore(deps): bump org.apache.maven.plugins:maven-assembly-plugin from 3.7.1 to 3.8.0
- #6329: chore(deps): bump org.mozilla:rhino from 1.7.15 to 1.7.15.1
- #6331: chore(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0
- #6332: chore(deps): bump org.mockito:mockito-core from 5.20.0 to 5.21.0
- #6333: chore(deps): bump actions/download-artifact from 6.0.0 to 7.0.0
- #6334: chore(deps): bump ruby/setup-ruby from 1.269.0 to 1.270.0
- #6335: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.2.0 to 12.3.0
- #6336: chore(deps): bump actions/cache from 4.3.0 to 5.0.1
- #6337: chore(deps): bump bigdecimal from 3.3.1 to 4.0.0 in /docs
- #6339: chore(deps): bump org.apache.maven.plugins:maven-release-plugin from 3.2.0 to 3.3.1
- #6341: chore(deps): bump org.apache.maven.plugins:maven-source-plugin from 3.3.1 to 3.4.0
- #6347: chore(deps-dev): bump org.apache.logging.log4j:log4j-core from 2.25.2 to 2.25.3 in /pmd-java
- #6350: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.24.2 to 0.25.1
- #6352: chore(deps): bump ruby/setup-ruby from 1.270.0 to 1.275.0
- #6353: chore(deps): bump org.ow2.asm:asm from 9.9 to 9.9.1
- #6354: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.2 to 1.18.3
- #6356: chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.4.0.6343 to 5.5.0.6356
- #6357: chore(deps): bump org.apache.commons:commons-text from 1.14.0 to 1.15.0
- #6358: chore(deps): bump bigdecimal from 4.0.0 to 4.0.1 in /docs
📈️ Stats
- 102 commits
- 39 closed tickets & PRs
- Days since last release: 32