Java News from Sunday, May 23, 2004

Pete Freitag has launched, javadocs.org a useful site for quickly loading standard class library documentation in by typing javadocs.org/classname in your web browser's location bar. "The site is basically a URL shortcut to java documentation, for example if you want the documentation for the String class, simply type: javadocs.org/string. You can also type in the full class name http://javadocs.org/java.lang.string, but only the class name is needed (which is nice if your not sure what package a class is in)." This then redirects you to the appropriate page on Sun's site. Class name matching is case insensitive. They're a few hitches. If you're looking for java.awt.List, you'll need to type the fully package qualified name because javadocs.org/list points to java.util.List; but overall it just works. It's a startlingly useful hack that requires zero installation. It works today in essentially all web browsers. Why didn't someone think of this years ago?


Tom Copeland has released PMD 1.8, an open source tool for automatically checking Java code for various classes of bugs. PMD scans Java source code and looks for potential problems including:

Version 1.8 adds five new rules: ExceptionAsFlowControlRule, BadComparisonRule, AvoidThrowingCertainExceptionTypesRule, AvoidCatchingNPERule, and OptimizableToArrayCallRule.

As is my wont, I tested this by running it across XOM's code base. I wasn't expecting much bebcause I do this with almost every release of every static code testing tool, and I haven't changed much in XOM lately becuase I've been nusy with other projects. Nonetheless it uncovered several dozen real issues including one possible genuine bug. If you haven't tried PMD on your code, you should. The documentation is poor and the user interface is cryptic, but it's worth deciphering.


QA-Systems has released QJ-Pro 2.1, another open source (GPL) static code analyzer for Java with plug-ins for Eclipse, JBuilder, and JDeveloper. I'd like to tell you how well this one work. Unfortunately, QJ-Pro follows the traditon in these sorts of tools of providing actively isleading documentation that describes file that aren't there, while not describing the files that are. PMD shares this problem, but I was at least able to figure out where the PMD docs differed from reality, and get it to run. QJ-Pro was completely non-functional. Doubtless there's some way to make it work, but I couldn't figure it out. :-(