b) I'm not advocating making a decision for the user, I'm just asking for a better message for the user so they can quickly sort it out.
Ceki G�lc� wrote:
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]
--
*Paul Smith *Software Architect
*Aconex * 31 Drummond Street, Carlton, VIC 3053, Australia *Tel: +61 3 9661 0200 *Fax: +61 3 9654 9946 Email: [EMAIL PROTECTED] www.aconex.com**
This email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system.**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
