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 5.0.1 available for download
Detectors added in git
Detectors added in v5.0.0
[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!
[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.
[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.
[ICA] Invalid Constant Argument
Looks for passing invalid constant arguments to some well known methods that expect an enum-like
value. However these JDK methods were created before the introduction of enums and thus used simple int
constants. Passing an invalid value will cause exceptions to occur.
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