fb-contrib is a bug detector plugin for the FindBugs application (findbugs.sourceforge.net).
This release adds six detectors that can easily be integrated into FindBugs by dropping the jar file into FindBugs' plugin directory. fb-contrib version 4.2.0 requires FindBugs version 1.1.0 or later. This version of fb-contrib uses java 1.5.
Special thanks to Chris Peterson and Grzegorz Slowikowski for contributing to this release. Chris provided the MoreDumbMethods detector and Grzegorz contributed the pom.xml to make it easier to push versions to the maven repository.
New Detectors added in this release:
Poorly Defined Parameter
Looks for non derivable methods that declare parameters and then cast those parameters to more specific types in the method. This is misleading and dangerous as you are not documenting through parameter types what is necessary for these parameters to function correctly.
Overzealous Casting
Looks for manual casts of objects that are more specific then needed as the value is assigned to a class or interface higher up in the inheritance chain. You only need to cast to that class or interface.
Inconsistent Key Name Casing
Looks for calls to HttpRequest.getParameter with parameters of the same name with different cases like 'id' and 'Id'.
Non Symmetric Equals
Looks for classes that break the fundamental rule of equivalence, which is symmetry. If a equals b, then b equals a. While it is usually wrong to allow equals to compare different types, at the very least you should make sure that each class knows about each other and is able to compare themselves with each other.
Non Functional Field
Looks for fields in serializable classes that are defined as both final and transient. As a transient field is not initialized when streamed, and is not initialized in a constructor, it will remain null because it is defined final.
More Dumb Methods
Looks for a variety of questionable method calls that will cause problems, are unsafe or use practices that might lead to bugs.