Re: checking for null Noob question

2010-07-31 Thread Jérémy DE ROYER
I won't do the second one because you could see a NullPointerException. Is it your question ? Jérémy Le 31 juil. 2010 à 14:05, Theodore Petrosky a écrit : Why does this work: public String dueDateTypeLetter() { if (this.dueDateType() == null ||

Re: checking for null Noob question

2010-07-31 Thread Theodore Petrosky
Yes... I was asking 'Why?' is there a NullPointerException with number 2... Ted --- On Sat, 7/31/10, Jérémy DE ROYER jeremy.dero...@ingencys.net wrote: From: Jérémy DE ROYER jeremy.dero...@ingencys.net Subject: Re: checking for null Noob question To: Theodore Petrosky tedp...@yahoo.com Cc

Re: checking for null Noob question

2010-07-31 Thread Jérémy DE ROYER
, Theodore Petrosky a écrit : Yes... I was asking 'Why?' is there a NullPointerException with number 2... Ted --- On Sat, 7/31/10, Jérémy DE ROYER jeremy.dero...@ingencys.net wrote: From: Jérémy DE ROYER jeremy.dero...@ingencys.net Subject: Re: checking for null Noob question To: Theodore

Re: checking for null Noob question

2010-07-31 Thread Farrukh Ijaz
was asking 'Why?' is there a NullPointerException with number 2... Ted --- On Sat, 7/31/10, Jérémy DE ROYER jeremy.dero...@ingencys.net wrote: From: Jérémy DE ROYER jeremy.dero...@ingencys.net Subject: Re: checking for null Noob question To: Theodore Petrosky tedp...@yahoo.com Cc

Re: checking for null Noob question

2010-07-31 Thread Paul Hoadley
Hi Ted, The '||' operator is a 'short circuit' operator, and it evaluates the left-hand side first. Assume this.dueDateType() returns null, then in this case: On 31/07/2010, at 9:35 PM, Theodore Petrosky wrote: if (this.dueDateType() == null || this.dueDateType().equals(N)) { the expression

Re: checking for null Noob question

2010-07-31 Thread Theodore Petrosky
Thanks, this was exactly the information I was looking for. Ted --- On Sat, 7/31/10, Paul Hoadley pa...@logicsquad.net wrote: From: Paul Hoadley pa...@logicsquad.net Subject: Re: checking for null Noob question To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com

Re: checking for null Noob question

2010-07-31 Thread Mike Schrag
...@logicsquad.net Subject: Re: checking for null Noob question To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Saturday, July 31, 2010, 8:46 AM Hi Ted, The '||' operator is a 'short circuit' operator, and it evaluates the left-hand side first. Assume

Re: checking for null Noob question

2010-07-31 Thread Steve Peery
, Jérémy DE ROYER jeremy.dero...@ingencys.net wrote: From: Jérémy DE ROYER jeremy.dero...@ingencys.net Subject: Re: checking for null Noob question To: Theodore Petrosky tedp...@yahoo.com Cc: webobjects-dev@lists.apple.com Date: Saturday, July 31, 2010, 8:07 AM I won't do the second one