|
|
||
David Walend's BlogNovember 2004 ArchivesAmazing -XlintPosted by dwalend on November 13, 2004 at 10:52 AM | Permalink | Comments (1)I've been reorganizing JDigraph to take advantage of generics. I've been able to implement generic versions of Floyd-Warshall and Dijkstra's algorithms -- hopefully using generics means doing this for the last time. I want to highlight -Xlint, a JDK 5 feature that's saved me a lot of grueling code reads as I've learned generics. I wish I'd found it sooner. My common-build.xml file's javac task now looks like
The feature pointed out a few hundred spots where I hadn't specified types on my first "make it work" pass. lint made short work of the clean-up pass. Further, lint pointed out places that needed some more thought, and helped keep me honest. I've fielded a lot of questions about generics over the last six weeks; none of the people asking had found -Xlint. Try it out. I found it more useful than any of the tutorials. | ||
|
|