Re: Ternary op + autoboxing + null value = NPE?
Re: Ternary op + autoboxing + null value = NPE?
- Subject: Re: Ternary op + autoboxing + null value = NPE?
- From: Lachlan Deck <email@hidden>
- Date: Tue, 20 Oct 2009 21:03:06 +1100
On 20/10/2009, at 3:17 PM, Chuck Hill wrote:
On Oct 19, 2009, at 8:59 PM, Lachlan Deck wrote:
On 20/10/2009, at 3:52 AM, Chuck Hill wrote:
On Oct 19, 2009, at 8:37 AM, Mike Schrag wrote:
I personally don't like boxing -- I think it's very misleading
and leads to weird bugs like this.
+1
Keep it consistent...
new Integer(1);
Integer.valueOf(1) is better for memory usage:
Returns a Integer instance representing the specified int value. If
a new Integer instance is not required, this method should generally
be used in preference to the constructor Integer(int), as this
method is likely to yield significantly better space and time
performance by caching frequently requested values.
Touché :)
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden