Migrating to a newer JDK

23 Nov 2005

Thanks to some suggestions by Allan Caplan, I'm working on some PMD rules to aid in migrating from one JDK version to another. So far I've only got a few simple ones, like ReplaceVectorWithList and ReplaceHashtableWithMap, but there are certainly more to add:

I've been looking around for more migration rules and came across this post by Attila Szegedi to the DevelopMentor advanced-java list. The replies mostly involve things that might be hard for PMD to track down - like problems with Swing tabbing and whatnot - but we'll see if any rules can come out of that.

It'd be especially nice to be able to suggest performance improvements - i.e., "use this new API because it's much faster than the old clunky way". ReplaceHashtableWithMap may fall into that category since it's suggesting that a synchronized collection usage be replaced with a non-synchronized one.... surely there are others.

Anyone have suggestions for rules to ease migration from one JDK version to another? Let me know, thanks!