Java News from Thursday, August 12, 2004

David Hovemeyer has posted FindBugs 0.8.4, an automated open source tool for finding potential bugs in Java code. Since the last release I reported here, a number of new bug detectors have been added.

For a change, I tested this release on the latest XIncluder code base, which I've recently picked up again to try and get it ready for the final release of the XInclude specification, and which I had not previously used static code checking tools on. It found three places where a stream that wasn't closed on all paths out of a method, and one unused private method. There was also a surprising report that my JUnit test case did not call super.setUp(). Nothing in the JUnit documentation says it should. After a little research, it seems this is primarily an issue if you're only indirectly extending TestCase from one of a third party subclass, not if you're extending junit.framework.TestCase itself. False positives were few.

Java 1.4 or later is required. FindBugs is published under the LGPL.