False Positive with implicit String.valuesOf() (Java)
A source code analyzer
Brought to you by:
adangel,
juansotuyo
When testing this class:
package com.mycompany.mavenproject1; import java.io.IOException; public class NewClass { public void falsePositive(Boolean b) throws IOException { System.out.write(( "" + b ).getBytes()); } }
You get this result
pmd-bin-5.2.1/bin/run.sh pmd -d src/main/java/ -f text -R java-basic,java-design /tmp/mavenproject1/src/main/java/com/mycompany/mavenproject1/NewClass.java:8: Useless parentheses.
However the parentheses are needed.
Diff:
Will be fixed with the next version.