On Sat, 6 Nov 2004 01:14:02 +0800, Adam wrote
(in article <>) :
> Wow - that's a lot of responses, cheers everyone!
>
> That is what I suspected and our next step will be to evaluate a load
> of different points in the code with this in mind. Based on the
> likelihood of a null scenario!
>
> Just to give a bit of context, this is part of a server side method
> called heavily by a multitude of clients - ergo performance is
> paramount, easily readable code can be sacrificied (but mitigated with
> verbose comments, one hopes).
>
> And no, I'm not a student
For good code design you should not be using exceptions , to do "if",
"while","case" processing.
There is a very good article on the sun java site , called ( i think) "use &
abuse of exceptions"
Your "use" sun classes as serious "abuse", but they also go indepth as to
why you should not do it (giving timings etc. basically when you cause an
exception you are creating an object each time it occurs), and it is very
expensive in time.
Finally if it is server side code ( and considering your user load) ,
consider , the operation of generating thousands of exceptions, both on
memory & time.
Eeeewwwww!!.
steve