Can I tell findbugs to ignore classes I am unable to add?

Viewed 13796

Findbugs reports this:

findbugs:
 [findbugs] Executing findbugs from ant task
 [findbugs] Running FindBugs...
 [findbugs] The following classes needed for analysis were missing:
 [findbugs]   com.company.OptionalClass
 [findbugs] Warnings generated: 11
 [findbugs] Missing classes: 2
 [findbugs] Calculating exit code...
 [findbugs] Setting 'missing class' flag (2)
 [findbugs] Setting 'bugs found' flag (1)
 [findbugs] Exit code set to: 3
 [findbugs] Java Result: 3
 [findbugs] Classes needed for analysis were missing
 [findbugs] Output saved to findbugs.xml
BUILD SUCCESSFUL

This OptionalClass is referenced from a third-party jar for which I do not have the source code, and for which I do not want a findbugs analysis. It refers to a class I do not have in my classpath, or anywhere else. This class is probably used in certain cases, when our third-party jar is configured in a certain way.

Is there a way to tell findbugs to ignore this class?

Note that it completes the analysis and produces a findbugs.xml report, so this is a minor issue.

3 Answers
Related