fb-contrib™: A FindBugs™ auxiliary detector plugin
fb-contrib™ is an extra detector plugin to be used with the static bug
finder FindBugs™ (findbugs.sourceforge.net). Just download the fb-contrib.jar
file, and place it in the appropriate location based on how you wish to use it. (See below). FindBugs™ will
automatically pick up the jar file, and incorporate these detectors with its
fb-contrib can be used from the Findbugs™ Gui, Ant, or the eclipse plugin.
To run fb-contrib from the gui, or ant, just place the fb-contrib jar in the plugins directory inside of the
To run fb-contrib from eclipse, assuming that the main FindBugs plugin is installed,
simply drop the fb-contrib.jar in the plugins directory of eclipse, and restart eclipse.
The latest version of fb-contrib is 4.8.2 available for download
Detectors added in svn
- [CVAA] ContraVariant Array Assignment
Looks for contravariant array assignments. Since arrays are mutable data structures, their use
must be restricted to covariant or invariant usage.
--contributed by Bhaskar Maddala - THANKS!
- [STB] Stacked Try Blocks
Looks for two or more try catch blocks that are consecutive and catch the
same kind of exception, and throw the same exception always. These blocks can
be coalesced into one.
- [CAAL] Confusing Array As List
Looks for calls to Arrays.asList where the parameter is a primitive array.
This does not produce a list that holds the primitive boxed value, but a list of
one item, the array itself.
- [PSC] Presize Collections
Looks for methods that create and populate collections, and while knowing
the end size of those collections, does not pre allocate the collection
to be big enough. This just causes unneeded reallocations putting strain
on the garbage collector.
- [UMTP] Unbound Method Template Parameter
Looks for methods that declare method level template parameter(s) that are not bound to any of
the method's parameters, and thus is not adding any validation/type safety to the method,
and is just confusing.
- [NPMC] Non Productive Method Call
Looks for common methods that are believed to be non mutating, where the value
is discarded. Since the method makes no changes to the object, calling this method
is useless. The method call can be removed.
Detectors added in v4.8.0
Detectors added in v4.6.0
Detectors added in v4.4.0
Detectors added in v4.2.0
Detectors added in v4.0.0
Detectors added in v3.8.0
Detectors added in v3.6.0
Detectors added in v3.4.0
Detectors added in v3.2.0
Detectors added in v3.0.0
Detectors added in v2.8.0
Detectors added in v2.6.0
Detectors added in v2.4.0
Detectors added in v2.2.0
Detectors added in v2.0.0
Detectors added in v1.8.0
Detectors added in v1.6.0
Detectors added in v1.4.0
Detectors added in v1.2.0
Detectors added in v1.0.0
Detectors added in v0.9.3
fb-contrib is a trademark of MeBigFatGuy.com
FindBugs is a trademark of University of Maryland