Java News from Friday, December 2, 2005

Tom Copeland has released PMD 3.4, an open source tool for automatically checking Java code for various classes of bugs. Version 3.4 adds thirteen new rules including:

The last five come from a new migration ruleset for helping to migrate from one Java version to another. This release also adds a "lint comment" facility for suppressing warning with annotations.

I tested this release out on XOM. This time it didn't locate any real bugs. There were some design points it flagged one might want to address, but I'm not sure. (Is it really helpful to declare private fields final? That always feels redundant to me.) PMD found a couple of really minor issues I chose to address to improve code clarity; but that's about it. I've definitely hit the point of diminishing returns with these sorts of tools.

David Hovemeyer and Bill Pugh have posted FindBugs 0.9.4, an automated open source tool for finding potential bugs in Java code. This is mostly a bug fix release.

I also tested this out on XOM. Almost all the bugs it found were false positives, though it did finally inspire me to fix one minor issue of string concatenations inside loops. FindBugs also worked its way back from XOM into Jaxen where it found some unreachable code I could eliminate. If I hadn't used this tool frequently in the past, it would have found more.