This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
A lot of times I will be writing a unit test which repeatedly calls some API that I have marked @CheckForNull. In the test I am not going to bother checking for null after each call; the method should not in fact return null in this case, and if it does, the test will catch that in some other way, such as an assertion or a NullPointerException. Or test code may legitimately do all sorts of things that would be considered inappropriate in production code, like repeatedly sleeping for 100ms, or hardcoding a path name, etc. Since it is typically of little value to run FindBugs on test code, and it introduces a lot of spurious warning badges, I would recommend disabling the automatic scan on test source roots (or at least doing so optionally).
Created attachment 162987 [details] Simple solution (no configuration option)