7.3 KiB
title | permalink | keywords |
---|---|---|
PMD Release Notes | pmd_release_notes.html | changelog, release notes |
{{ site.pmd.date }} - {{ site.pmd.version }}
The PMD team is pleased to announce PMD {{ site.pmd.version }}.
This is a {{ site.pmd.release_type }} release.
{% tocmaker is_release_notes_processor %}
New and noteworthy
### Updatex Apex Support
- The Apex language support has been bumped to version 45 (Spring '19). All new language features are now properly parsed and processed.
New Rules
-
The new Java rule {% rule "java/multithreading/UnsynchronizedStaticFormatter" %} (
java-multithreading
) detects unsynchronized usages of staticjava.text.Format
instances. This rule is a more generic replacement of the rule {% rule "java/multithreading/UnsynchronizedStaticDateFormatter" %} which focused just onDateFormat
. -
The new Java rule {% rule "java/bestpractices/ForLoopVariableCount" %} (
java-bestpractices
) checks for the number of control variables in a for-loop. Having a lot of control variables makes it harder to understand what the loop does. The maximum allowed number of variables is by default 1 and can be configured by a property. -
The new Java rule {% rule "java/bestpractices/AvoidReassigningLoopVariables" %} (
java-bestpractices
) searches for loop variables that are reassigned. Changing the loop variables additionally to the loop itself can lead to hard-to-find bugs. -
The new Java rule {% rule "java/codestyle/UseDiamondOperator" %} (
java-codestyle
) looks for constructor calls with explicit type parameters. Since Java 1.7, these type parameters are not necessary anymore, as they can be inferred now.
Modified Rules
- The Java rule {% rule "java/codestyle/LocalVariableCouldBeFinal" %} (
java-codestyle
) has a new propertyignoreForEachDecl
, which is by default disabled. The new property allows for ignoring non-final loop variables in a for-each statement.
Deprecated Rules
- The Java rule {% rule "java/multithreading/UnsynchronizedStaticDateFormatter" %} has been deprecated and will be removed with PMD 7.0.0. The rule is replaced by the more general {% rule "java/multithreading/UnsynchronizedStaticFormatter" %}.
Fixed Issues
- all
- #1196: [core] CPD results not consistent between runs
- apex
- java
- java-bestpractices
- java-codestyle
- java-errorprone
- java-multithreading
- #1533: [java] New rule: UnsynchronizedStaticFormatter
- plsql
- #1507: [plsql] Parse Exception when using '||' operator in where clause
- #1508: [plsql] Parse Exception when using SELECT COUNT(*)
- #1509: [plsql] Parse Exception with OUTER/INNER Joins
- #1511: [plsql] Parse Exception with IS NOT NULL
- #1526: [plsql] ParseException when using TableCollectionExpression
- #1583: [plsql] Update Set Clause should allow multiple columns
- #1586: [plsql] Parse Exception when functions are used with LIKE
API Changes
Deprecated API
- {% jdoc core::lang.rule.stat.StatisticalRule %} and the related helper classes and base rule classes are deprecated for removal in 7.0.0. This includes all of {% jdoc_package core::stat %} and {% jdoc_package core::lang.rule.stat %}, and also {% jdoc java::lang.java.rule.AbstractStatisticalJavaRule %}, {% jdoc apex::lang.apex.rule.AbstractStatisticalApexRule %} and the like. The methods {% jdoc !c!core::Report#addMetric(core::stat.Metric) %} and {% jdoc core::ThreadSafeReportListener#metricAdded(core::stat.Metric) %} will also be removed.
External Contributions
- #1503: [java] Fix for ReturnFromFinallyBlock false-positives - RishabhDeep Singh
- #1514: [java] LocalVariableCouldBeFinal: allow excluding the variable in a for-each loop - Kris Scheibe
- #1516: [java] OneDeclarationPerLine: Don't report multiple variables in a for statement. - Kris Scheibe
- #1520: [java] New rule: ForLoopVariableCount: check the number of control variables in a for loop - Kris Scheibe
- #1521: [java] Upgrade to ASM7 for JDK 11 support - Mark Pritchard
- #1530: [java] New rule: AvoidReassigningLoopVariables - Kris Scheibe
- #1534: [java] This is the change regarding the usediamondoperator #1517 - hemanshu070
- #1545: [doc] fixing dead links + tool to check for dead links automatically - Kris Scheibe
- #1551: [java] InvalidSlf4jMessageFormatRule should not throw NPE for enums - Robbie Martinus
- #1552: [core] Upgrading Google Gson from 2.5 to 2.8.5 - Thunderforge
- #1553: [core] Upgrading System Rules dependency from 1.8.0 to 1.19.0 - Thunderforge
- #1554: [plsql] updates should allow for multiple statements - tashiscool
- #1584: [core] Fixes 1196: inconsistencies of clones returned by different CPD executions for the same files - Bruno Ferreira
{% endtocmaker %}