@ -154,7 +154,8 @@ sb.append('a'); // use this instead
|
||||
class="net.sourceforge.pmd.lang.java.rule.strings.ConsecutiveAppendsShouldReuseRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/rules/java/strings.html#ConsecutiveAppendsShouldReuse">
|
||||
<description>
|
||||
Consecutively calls to StringBuffer/StringBuilder .append should reuse the target object. This can improve the performance.
|
||||
Consecutive calls to StringBuffer/StringBuilder .append should be chained, reusing the target object. This can improve the performance
|
||||
by producing a smaller bytecode, reducing overhead and improving inlining. A complete analysis can be found [here](https://github.com/pmd/pmd/issues/202#issuecomment-274349067)
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
@ -398,4 +399,4 @@ public class Foo {
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
||||
</ruleset>
|
||||
|
@ -252,6 +252,8 @@ to avoid XSS attacks.
|
||||
* [#1551](https://sourceforge.net/p/pmd/bugs/1551/): \[java] InvalidSlf4jMessageFormat: fails with NPE
|
||||
* java-unnecessary
|
||||
* [#199](https://github.com/pmd/pmd/issues/199): \[java] UselessParentheses: Parentheses in return statement are incorrectly reported as useless
|
||||
* java-strings
|
||||
* [#202](https://github.com/pmd/pmd/issues/202): \[java] \[doc] ConsecutiveAppendsShouldReuse is not really an optimization
|
||||
* XML
|
||||
* [#1518](https://sourceforge.net/p/pmd/bugs/1518/): \[xml] Error while processing xml file with ".webapp" in the file or directory name
|
||||
* psql
|
||||
|
Reference in New Issue
Block a user