diff --git a/feed.xml b/feed.xml index fa0d019b7b..f00b52a9d6 100644 --- a/feed.xml +++ b/feed.xml @@ -5,8 +5,8 @@ Intended as a documentation theme based on Jekyll for technical writers documenting software and other technical products, this theme has all the elements you would need to handle multiple products with both multi-level sidebar navigation, tags, and other documentation features. https://pmd.github.io/pmd/ - Fri, 01 Jul 2022 07:52:40 +0000 - Fri, 01 Jul 2022 07:52:40 +0000 + Fri, 01 Jul 2022 10:50:37 +0000 + Fri, 01 Jul 2022 10:50:37 +0000 Jekyll v3.9.2 diff --git a/pmd_release_notes.html b/pmd_release_notes.html index 85ea47c67e..27a2ef231d 100644 --- a/pmd_release_notes.html +++ b/pmd_release_notes.html @@ -1545,11 +1545,19 @@ for the Gherkin language. It is

Fixed Issues

+

API Changes

External Contributions

diff --git a/pmd_rules_java_performance.html b/pmd_rules_java_performance.html index 2517e13fa1..67022220e3 100644 --- a/pmd_rules_java_performance.html +++ b/pmd_rules_java_performance.html @@ -1534,10 +1534,16 @@

Priority: Medium (3)

The conversion of literals to strings by concatenating them with empty strings is inefficient. -It is much better to use one of the type-specific toString() methods instead.

+It is much better to use one of the type-specific toString() methods instead or String.valueOf().

This rule is defined by the following XPath expression:

//AdditiveExpression/PrimaryExpression/PrimaryPrefix/Literal[@Image='""' and not(ancestor::Annotation)]
+|
+//AdditiveExpression/PrimaryExpression/PrimaryPrefix/Name
+  [@Image = (//FieldDeclaration[@Final = true()]|ancestor::MethodDeclaration//LocalVariableDeclaration[@Final = true()])
+                /VariableDeclarator[@Initializer = true()]
+                    [VariableInitializer/Expression/PrimaryExpression/PrimaryPrefix/Literal[@Image='""']]
+                    /VariableDeclaratorId/@Name]
 

Example(s):