Hello there. I apologize for possible repeat, but I have a question. I'm use the IDEA FindBugs plugin 1.0.0 and I checked that code:
private String tst() {
//wtf
StringBuilder stringBuilder = new StringBuilder('%');
//wtf2
if (stringBuilder.length()<0 && stringBuilder.length()>0) {
stringBuilder.append(1);
}
//wtf3
if (stringBuilder.length()<0 && stringBuilder.length()>0) {
stringBuilder.append(2);
}
stringBuilder.append(true);
return stringBuilder.toString();
}
FindBug didn't find something special. The first wtf is at least debatable as a bad practice. The second and the third... Obviously, it is the method, not a variable, and FindBugs make a conclusion - each calling of that can produce different result. But I called method from java.lang with the well-known implementation. Perhaps this situation (and the same) should be handled?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello there. I apologize for possible repeat, but I have a question. I'm use the IDEA FindBugs plugin 1.0.0 and I checked that code:
FindBug didn't find something special. The first wtf is at least debatable as a bad practice. The second and the third... Obviously, it is the method, not a variable, and FindBugs make a conclusion - each calling of that can produce different result. But I called method from java.lang with the well-known implementation. Perhaps this situation (and the same) should be handled?