On Thursday, August 14, 2003, at 10:03 am, Alex Blewitt wrote:


On Thursday, Aug 14, 2003, at 09:50 Europe/London, James Strachan wrote:


I favour IAE myself as a guideline though wouldn't rule against NPE in some code.

In what situations would you use a NPE, then? I can't think of any situation where an NPE could be considered useful when in all other times it reports a bug.

I'd prefer IAE. However I'm more bothered about getting a kick ass J2EE server that passes the TCK. Having every possible NPE case in the code covered is lower down my list of priorities.


In the situations you outline in your next message, why couldn't you use (say) IAE or even RuntimeException?

I'm saying lets use IAE - just lets not be too strict, its a good guideline.



Note on further checking - NPE is not an IAE. They're both RuntimeExceptions but thats about it. Sorry Jason I think you're mistaken - but it would have been nice though.


James
-------
http://radio.weblogs.com/0112098/



Reply via email to