Table of Contents

29-June-2026 - 7.26.0-SNAPSHOT

The PMD team is pleased to announce PMD 7.26.0-SNAPSHOT.

This is a minor release.

🚀️ New and noteworthy

🌟️ New and Changed Rules

New Rules

  • The new Java rule WrongTestAnnotation detects when test annotations from the wrong testing framework (JUnit 4, JUnit Jupiter, or TestNG) are used in your code, preventing tests from being silently skipped due to framework mismatches. This helps avoid the silent failure where tests compile but don’t execute because the test runner doesn’t recognize the annotation.
  • The new Kotlin rule LocalVariableShadowsParameter detects local variable declarations that use the same name as a parameter of the enclosing function. This shadows the parameter and may lead to confusion about which value is used.

🐛️ Fixed Issues

  • apex-security
    • #3877: [apex] ApexCRUDViolation: False positive with Lists of Objects with getSObjectType().getDescribe()
  • cpp
    • #6641: [cpp]: IndexOutOfBoundsException in CPD when a duplication is at end of file with UTF8-BOM
  • java-bestpractices
    • #6692: [java] ForLoopCanBeForeach: inconsistent detection between i += 1 and i = i + 1 update forms
  • java-codestyle
    • #6239: [java] UseDiamondOperator: False positive with Guice TypeLiteral
  • java-errorprone
    • #2846: [java] New Rule: WrongTestAnnotation
    • #6743: [java] CloseResource: False positive for closeable initialized with (T) null
  • kotlin-bestpractices
    • #6732: [kotlin] New Rule: LocalVariableShadowsParameter

🚨️ API Changes

✨️ Merged pull requests

📦️ Dependency updates

📈️ Stats