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
Booleanwrapper
- #5253: [java] BooleanGetMethodName: False-negatives with
- java-errorprone
- #5067: [java] CloseResource: False positive for FileSystems.getDefault()
🚨 API Changes
- java-bestpractices
- The old rule name
JUnit4TestShouldUseAfterAnnotationhas been deprecated. Use the new nameUnitTestShouldUseAfterAnnotationinstead. - The old rule name
JUnit4TestShouldUseBeforeAnnotationhas been deprecated. Use the new nameUnitTestShouldUseBeforeAnnotationinstead. - The old rule name
JUnit4TestShouldUseTestAnnotationhas been deprecated. Use the new nameUnitTestShouldUseTestAnnotationinstead. - The old rule name
JUnitAssertionsShouldIncludeMessagehas been deprecated. Use the new nameUnitTestAssertionsShouldIncludeMessageinstead. - The old rule name
JUnitTestContainsTooManyAssertshas been deprecated. Use the new nameUnitTestContainsTooManyAssertsinstead. - The old rule name
JUnitTestsShouldIncludeAsserthas been deprecated. Use the new nameUnitTestShouldIncludeAssertinstead.
- 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)
- #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)