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. findbugs.html
        811 kB
        Rob Godfrey
      2. findbugs.html
        388 kB
        Rob Godfrey
      3. report.html.zip
        85 kB
        Robbie Gemmell

        Activity

        Rob Godfrey created issue -
        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
        Rob Godfrey made changes -
        Field Original Value New Value
        Attachment findbugs.html [ 12454415 ]
        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
        Rob Godfrey made changes -
        Attachment findbugs.html [ 12454416 ]
        Robbie Gemmell made changes -
        Attachment report.html.zip [ 12454979 ]
        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
        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 -

        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.
        Robbie Gemmell made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Robbie Gemmell made changes -
        Component/s Java Management : CLI Tool [ 12312539 ]
        Robbie Gemmell made changes -
        Labels qman
        Robbie Gemmell made changes -
        Labels qman
        Robbie Gemmell made changes -
        Component/s Java Management : QMan [ 12312540 ]
        Robbie Gemmell made changes -
        Component/s Java Clustering [ 12311585 ]
        Robbie Gemmell made changes -
        Component/s Java Management : QMF [ 12313412 ]
        Robbie Gemmell made changes -
        Labels derbystore
        Robbie Gemmell made changes -
        Component/s Java Broker Derby Store [ 12312426 ]
        Robbie Gemmell made changes -
        Labels derbystore derbystore jmx_interface
        Robbie Gemmell made changes -
        Component/s Java Management : JMX Interface [ 12313025 ]
        Rob Godfrey made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        49d 11h 40m 1 Robbie Gemmell 01/Nov/10 10:00
        Resolved Resolved Closed Closed
        1563d 10h 5m 1 Rob Godfrey 11/Feb/15 20:06

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development