Rule Set: java-optimizations/UseStringBufferForStringAppends
Description:
False Positive, similar to https://sourceforge.net/p/pmd/bugs/1340/, but with flipped condition and arguments.
Code Sample demonstrating the issue:
public class UseStringBuffer {
public void foo() {
String country = request.getParameter("country");
country = (country != null) ? country : "USA";
}
}
Running PMD through: CLI
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4