Bill Pugh of the University of Maryland has released
FindBugs
1.3.6, an automated open source tool for finding potential
bugs in Java code. New bug detectors in this release include:
- static analysis of uses of format strings, checking for missing or extra arguements, invalid format specifiers, or mismatched format specifiers and arguments (e.g, passing a String value for a %d format specifier). \\
- BIT_ADD_OF_SIGNED_BYTE
- EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS, a warning when an equals method checks to see if an operand is an instance of a class not compatible with itself. For example, if the Foo class checks to see if the argument is an instance of String. This is either a questionable design decision or a coding mistake.
- Invoking hashCode() on an array
- Using x.removeAll(x) to rather than x.clear() to clear an array.
- Calls such as x.contains(x), x.remove(x) and x.containsAll(x).