Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1498 closed task (fixed)

Investigate and fix issues found by FindBugs

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.16
Component: core Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

FindBugs (http://findbugs.sourceforge.net/) is a code analyzer program that can find a wide range of potential issues. We have used this before (#397) but it is maybe time to check the code again.

I have used FindBugs 1.3.9 on the majority of the BASE code and it found 400+ potential issues. I think we should go through the list and see if we need to fix anything.

I have attached the result of the initial analysis to this ticket (findbugs-initial.xml). To use this file, download it and place it in the root BASE folder and open it in FindBugs.

I have also attached an empty FindBugs project file (findbugs-empty.xml). Load this file and goto File -> Redo analysis after bugs have been fixed, otherwise the fixed bugs remains in the file and reappear the next time the project is loaded.

Attachments (3)

findbugs-initial.xml (767.6 KB ) - added by Nicklas Nordborg 14 years ago.
Initial result of FindBugs analysis
findbugs-empty.xml (5.3 KB ) - added by Nicklas Nordborg 14 years ago.
Empty project file for FindBugs
findbugs-5384.xml (321.7 KB ) - added by Nicklas Nordborg 14 years ago.
Remaining issues after changeset [5384]

Download all attachments as: .zip

Change History (11)

by Nicklas Nordborg, 14 years ago

Attachment: findbugs-initial.xml added

Initial result of FindBugs analysis

comment:1 by Nicklas Nordborg, 14 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

by Nicklas Nordborg, 14 years ago

Attachment: findbugs-empty.xml added

Empty project file for FindBugs

comment:2 by Nicklas Nordborg, 14 years ago

Description: modified (diff)

comment:3 by Nicklas Nordborg, 14 years ago

Description: modified (diff)

comment:4 by Nicklas Nordborg, 14 years ago

(In [5384]) References #1498: Investigate and fix issues found by FindBugs

Fixes a lot of things found by FindBugs. There were no really serious problems, but some minor that can improve stability in exceptional cases.

The number of issues have been reduced to 232. I'll attach a FindBugs project file with the final results that also includes comments about some of the issues.

by Nicklas Nordborg, 14 years ago

Attachment: findbugs-5384.xml added

Remaining issues after changeset [5384]

comment:5 by Nicklas Nordborg, 14 years ago

Resolution: fixed
Status: assignedclosed

comment:6 by Nicklas Nordborg, 14 years ago

(In [5391]) References #1498: Investigate and fix issues found by FindBugs

Reverted a change made in [5384] since it caused the taglib to store and use old DbControl:s.

comment:7 by Nicklas Nordborg, 14 years ago

(In [5392]) References #1498: Investigate and fix issues found by FindBugs

Another "fix" that caused problems since we forgot to open the file stream.

comment:8 by Nicklas Nordborg, 14 years ago

(In [5393]) References #1498: Investigate and fix issues found by FindBugs

Incorrect if statment when checking if a directory exists.

Note: See TracTickets for help on using tickets.