At 09:42 PM 12/2/2004, Paul Smith wrote:
Any reason why? NPE's are not useful to the end user.
A bait? I'll take it.
Saying that no one has use for NPEs is like saying no one has use for
hemorrhoids. For the time being, only Jake encountered this particular
NPE issue. He did so because of his very particular context.
The debate is about defensive programming. Jake's fix is similar to
the following:
class UsesFoo {
Hammer myHammer = new Hammer();
Foo foo;
setFoo(Foo foo) {
if(foo.getHammer() == 0) {
// What, foo does not have a hammer? Surely foo'd wants ours.
foo.setHammer(myHammer);
}
this.foo = foo;
}
Not all defensive coding is good. I don't like this particular
defensive coding style, so I reverted it.
Jake has reported other bugs which require attention. I'd rather spend
my time with that, than replying to this bate. Oh, well.
Ceki G�lc� wrote:
May I ask you to defer this discussion to later?
--
Ceki G�lc�
The complete log4j manual: http://qos.ch/eclm
Professional log4j support: http://qos.ch/log4jSupport
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]