Table of Contents
25-October-2024 - 7.7.0-SNAPSHOT
The PMD team is pleased to announce PMD 7.7.0-SNAPSHOT.
This is a minor release.
🚀 New and noteworthy
🌟 Rule Changes
Renamed Rules
Several rules for unit testing have been renamed to better reflect their actual scope. Lots of them were called after JUnit / JUnit 4, even when they applied to JUnit 5 and / or TestNG.
UnitTestAssertionsShouldIncludeMessage
(Java Best Practices) has been renamed fromJUnitAssertionsShouldIncludeMessage
.UnitTestContainsTooManyAsserts
(Java Best Practices) has been renamed fromJUnitTestContainsTooManyAsserts
.UnitTestShouldIncludeAssert
(Java Best Practices) has been renamed fromJUnitTestsShouldIncludeAssert
.UnitTestShouldUseAfterAnnotation
(Java Best Practices) has been renamed fromJUnit4TestShouldUseAfterAnnotation
.UnitTestShouldUseBeforeAnnotation
(Java Best Practices) has been renamed fromJUnit4TestShouldUseBeforeAnnotation
.UnitTestShouldUseTestAnnotation
(Java Best Practices) has been renamed fromJUnit4TestShouldUseTestAnnotation
.
The old rule names still work but are deprecated.
🐛 Fixed Issues
- java
- java-codestyle
- #5253: [java] BooleanGetMethodName: False-negatives with
Boolean
wrapper
- #5253: [java] BooleanGetMethodName: False-negatives with
- java-errorprone
- #5067: [java] CloseResource: False positive for FileSystems.getDefault()
🚨 API Changes
- java-bestpractices
- The old rule name
JUnit4TestShouldUseAfterAnnotation
has been deprecated. Use the new nameUnitTestShouldUseAfterAnnotation
instead. - The old rule name
JUnit4TestShouldUseBeforeAnnotation
has been deprecated. Use the new nameUnitTestShouldUseBeforeAnnotation
instead. - The old rule name
JUnit4TestShouldUseTestAnnotation
has been deprecated. Use the new nameUnitTestShouldUseTestAnnotation
instead. - The old rule name
JUnitAssertionsShouldIncludeMessage
has been deprecated. Use the new nameUnitTestAssertionsShouldIncludeMessage
instead. - The old rule name
JUnitTestContainsTooManyAsserts
has been deprecated. Use the new nameUnitTestContainsTooManyAsserts
instead. - The old rule name
JUnitTestsShouldIncludeAssert
has been deprecated. Use the new nameUnitTestShouldIncludeAssert
instead.
- The old rule name
✨ Merged pull requests
- #4965: [java] Rename JUnit rules with overly restrictive names - Juan Martín Sotuyo Dodero (@jsotuyod)
- #5225: [java] Fix #5067: CloseResource: False positive for FileSystems.getDefault() - Lukas Gräf (@lukasgraef)
- #5241: Ignore javacc code in coverage report - Juan Martín Sotuyo Dodero (@jsotuyod)
- #5258: Ignore generated antlr classes in coverage reports - Juan Martín Sotuyo Dodero (@jsotuyod)
- #5264: [java] Fix NPE with empty pattern list - Clément Fournier (@oowekyala)
- #5269: [java] Fix #5253: Support Boolean wrapper class for BooleanGetMethodName rule - Aryant Tripathi (@Aryant-Tripathi)