Affects PMD Version:
6.22.0
Rule:
RedundantFieldInitializer
Description:
RedundantFieldInitializer can not detect a special case for char
initialize: char foo = '\0';
The reason for the undetectability is that '\0'
can't convert to int directly, in value = (int) literal.getImage().charAt(1);
in pmd-java-6.22.0-sources.jar!\net\sourceforge\pmd\lang\java\rule\performance\RedundantFieldInitializerRule.java_93
Code Sample demonstrating the issue:
Expected outcome:
false-negative
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