It's horrible. Nearly everyone thinks aforehand that if it is later, then it is greater. You hear comments sometimes that Hashtable should not be used, explaing that it was written earlier. Well, I got news for ya: That would be like saying Object should not be used because it was written in an earlier time ~ another era, actually, and has been superceded by the Bloat-O-Matic Code Hog that swamps all known page-demand algorithms.
The answer to your queston is best approached by a tradional idiom that I saw recently and have now learned to place in my code, instinctively.
if(s == null )handle; That prevents exceptions from originating at that point in the code.
Now, if you get one [an exception] you handle it in the catch clause. Say for an example a
String is held in your collection. If you encounter a null, just set that string to a new empty string as:
if(s == null )s = new String("");
Or call next on the iterator or something.
You handle exceptions in a catch clause.
[ September 22, 2007: Message edited by: Nicholas Jordan ]