Update documentation
https://github.com/pmd/pmd/actions/runs/2596021937
06e166adec...a191bcb2f8
This commit is contained in:
4
feed.xml
4
feed.xml
@ -5,8 +5,8 @@
|
||||
<description>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.</description>
|
||||
<link>https://pmd.github.io/pmd/</link>
|
||||
<atom:link href="https://pmd.github.io/pmd/feed.xml" rel="self" type="application/rss+xml"/>
|
||||
<pubDate>Fri, 01 Jul 2022 07:52:40 +0000</pubDate>
|
||||
<lastBuildDate>Fri, 01 Jul 2022 07:52:40 +0000</lastBuildDate>
|
||||
<pubDate>Fri, 01 Jul 2022 10:50:37 +0000</pubDate>
|
||||
<lastBuildDate>Fri, 01 Jul 2022 10:50:37 +0000</lastBuildDate>
|
||||
<generator>Jekyll v3.9.2</generator>
|
||||
|
||||
</channel>
|
||||
|
@ -1545,11 +1545,19 @@ for the <a href="https://cucumber.io/docs/gherkin/">Gherkin</a> language. It is
|
||||
</ul>
|
||||
|
||||
<h3 id="fixed-issues">Fixed Issues</h3>
|
||||
<ul>
|
||||
<li>java-performance
|
||||
<ul>
|
||||
<li><a href="https://github.com/pmd/pmd/issues/3625">#3625</a>: [java] AddEmptyString - false negative with empty var</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="api-changes">API Changes</h3>
|
||||
|
||||
<h3 id="external-contributions">External Contributions</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/pmd/pmd/pull/3984">#3984</a>: [java] Fix AddEmptyString false-negative issue - <a href="https://github.com/LiGaOg">@LiGaOg</a></li>
|
||||
<li><a href="https://github.com/pmd/pmd/pull/4017">#4017</a>: Add Gherkin support to CPD - <a href="https://github.com/ASBrouwers">@ASBrouwers</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -1534,10 +1534,16 @@
|
||||
<p><strong>Priority:</strong> Medium (3)</p>
|
||||
|
||||
<p>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.</p>
|
||||
It is much better to use one of the type-specific <code class="language-plaintext highlighter-rouge">toString()</code> methods instead or <code class="language-plaintext highlighter-rouge">String.valueOf()</code>.</p>
|
||||
|
||||
<p><strong>This rule is defined by the following XPath expression:</strong></p>
|
||||
<div class="language-xpath highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">//</span><span class="nt">AdditiveExpression</span><span class="o">/</span><span class="nt">PrimaryExpression</span><span class="o">/</span><span class="nt">PrimaryPrefix</span><span class="o">/</span><span class="nt">Literal</span><span class="p">[</span><span class="na">@Image</span><span class="err">=</span><span class="s1">'""'</span><span class="w"> </span><span class="ow">and</span><span class="w"> </span><span class="ow">not</span><span class="p">(</span><span class="kn">ancestor::</span><span class="nt">Annotation</span><span class="p">)]</span><span class="w">
|
||||
</span><span class="p">|</span><span class="w">
|
||||
</span><span class="o">//</span><span class="nt">AdditiveExpression</span><span class="o">/</span><span class="nt">PrimaryExpression</span><span class="o">/</span><span class="nt">PrimaryPrefix</span><span class="o">/</span><span class="nt">Name</span><span class="w">
|
||||
</span><span class="p">[</span><span class="na">@Image</span><span class="w"> </span><span class="err">=</span><span class="w"> </span><span class="p">(</span><span class="o">//</span><span class="nt">FieldDeclaration</span><span class="p">[</span><span class="na">@Final</span><span class="w"> </span><span class="err">=</span><span class="w"> </span><span class="nf">true</span><span class="p">()]|</span><span class="kn">ancestor::</span><span class="nt">MethodDeclaration</span><span class="o">//</span><span class="nt">LocalVariableDeclaration</span><span class="p">[</span><span class="na">@Final</span><span class="w"> </span><span class="err">=</span><span class="w"> </span><span class="nf">true</span><span class="p">()])</span><span class="w">
|
||||
</span><span class="o">/</span><span class="nt">VariableDeclarator</span><span class="p">[</span><span class="na">@Initializer</span><span class="w"> </span><span class="err">=</span><span class="w"> </span><span class="nf">true</span><span class="p">()]</span><span class="w">
|
||||
</span><span class="p">[</span><span class="nt">VariableInitializer</span><span class="o">/</span><span class="nt">Expression</span><span class="o">/</span><span class="nt">PrimaryExpression</span><span class="o">/</span><span class="nt">PrimaryPrefix</span><span class="o">/</span><span class="nt">Literal</span><span class="p">[</span><span class="na">@Image</span><span class="err">=</span><span class="s1">'""'</span><span class="p">]]</span><span class="w">
|
||||
</span><span class="o">/</span><span class="nt">VariableDeclaratorId</span><span class="err">/</span><span class="na">@Name</span><span class="p">]</span><span class="w">
|
||||
</span></code></pre></div></div>
|
||||
|
||||
<p><strong>Example(s):</strong></p>
|
||||
|
Reference in New Issue
Block a user