Qpid
  1. Qpid
  2. QPID-2857

[Java] Running FindBugs against Java codebase reveals room for improvement

    Details

      Description

      FindBugs (http://findbugs.sourceforge.net/) is a program which uses static analysis to look for bugs in Java code

      Ideally we should incorporate Findbugs into our ant build such that we can be informed when new critical issues may have been introduced.

      In the interim findbugs can be run manually.

      Where critical issues are discovered by findbugs we should correct these

      1. report.html.zip
        85 kB
        Robbie Gemmell
      2. findbugs.html
        811 kB
        Rob Godfrey
      3. findbugs.html
        388 kB
        Rob Godfrey

        Activity

        Hide
        Robbie Gemmell added a comment -

        Resolving this issue for 0.7 as all the highlighted critical issues have been fixed and there havent been any commits agaisnt the JIRA for a while. Any further FindBugs related commits should have a new JIRA raised.

        Show
        Robbie Gemmell added a comment - Resolving this issue for 0.7 as all the highlighted critical issues have been fixed and there havent been any commits agaisnt the JIRA for a while. Any further FindBugs related commits should have a new JIRA raised.
        Hide
        Robbie Gemmell added a comment -

        I also added/increased the Xmx setting for the FindBugs ant task added to the build system, as it would consistently OOM quickly when run otherwise. The FindBugs task catches this OOM itself and the ant build completes 'successfully' as a result. I viewed peak memory usage of around 350MB, so set Xmx to 512MB.

        Show
        Robbie Gemmell added a comment - I also added/increased the Xmx setting for the FindBugs ant task added to the build system, as it would consistently OOM quickly when run otherwise. The FindBugs task catches this OOM itself and the ant build completes 'successfully' as a result. I viewed peak memory usage of around 350MB, so set Xmx to 512MB.
        Hide
        Robbie Gemmell added a comment -

        Committed revision 998700, removed around 60 high/medium warnings which FindBugs highlighted.

        Current FindBugs stats:

        High Priority Warnings: 0
        Medium Priority Warnings: 383
        Total Warnings: 383

        Show
        Robbie Gemmell added a comment - Committed revision 998700, removed around 60 high/medium warnings which FindBugs highlighted. Current FindBugs stats: High Priority Warnings: 0 Medium Priority Warnings: 383 Total Warnings: 383
        Hide
        Rob Godfrey added a comment -

        Committed revision 996393.

        Updated with a number of fixes to reduce the potential bugs which FindBugs highlighted

        High Priority Warnings: 28
        Medium Priority Warnings: 506
        Total Warnings: 534

        Show
        Rob Godfrey added a comment - Committed revision 996393. Updated with a number of fixes to reduce the potential bugs which FindBugs highlighted High Priority Warnings: 28 Medium Priority Warnings: 506 Total Warnings: 534
        Hide
        Rob Godfrey added a comment -

        Output of running FindBugs against the non-test Java code for svn revision 996392.

        High Priority Warnings: 654
        Medium Priority Warnings: 577
        Total Warnings: 1231

        Show
        Rob Godfrey added a comment - Output of running FindBugs against the non-test Java code for svn revision 996392. High Priority Warnings: 654 Medium Priority Warnings: 577 Total Warnings: 1231

          People

          • Assignee:
            Rob Godfrey
            Reporter:
            Rob Godfrey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development