Affects PMD Version: 6.2.0
Rule: UselessParenthesis
Description: See example, they aren't useless. First character in str1
may well be an underscore.
Code Sample demonstrating the issue:
public class Test {
private String str1;
public String themeName() {
return (Character.toUpperCase(str1.charAt(0))
+ str1.substring(1)).replace('_', ' ');
}
}
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other] eclipse-pmd 1.11
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