dev@glassfish.java.net

FindBugs - change to bug counts and fbcat

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Mon, 12 Aug 2013 14:51:21 -0700

Many of you use the "fbcat" tool [1] to convert FindBugs output to a simple
text format. We use it as part of the reminder messages you get about
FindBugs errors.

There has long been a discrepancy between the number of errors reported by
fbcat and the number of errors reported by the FindBugs Hudson job. I've
fixed this discrepancy, but this means you'll see fewer errors from fbcat.

For some types of errors, FindBugs will provide information about more than
one line. For example, for "null dereference" errors, it tells you the line
the variable was dereferenced, the line the variable was set to null, and the
line where the variable was last known to be null.

For "inconsistent synchronization" errors, FindBugs will tell you all the
lines where the field was not synchronized and all the lines where the
field was synchronized.

With this change, fbcat will report only the first line for each of these
errors. That's enough to tell you that something is wrong, but when you
set about to fix the error you might want the additional information.

I've added a new "-a" option to fbcat to show these additional error lines,
including additional information for each line showing its role in the error
report.

Let me know if you have any questions.



[1] Available in Oracle at
/net/bat-sca/repine/export2/hudson/tools/findbugs-tool-latest/fbcat
and in the workspace
https://svn.java.net/svn/glassfish~svn/trunk/findbugs
at findbugstotext/src/scripts/fbcat. See the script for available options.