Re: Objects don't get initialized sometimes
Re: Objects don't get initialized sometimes
- Subject: Re: Objects don't get initialized sometimes
- From: Chuck Hill <email@hidden>
- Date: Wed, 13 Jan 2010 19:48:17 -0800
On Jan 13, 2010, at 7:36 PM, Ken Anderson wrote:
One minor point... weight, which is a BigDecimal, is immutable.
The 'setScale' method actually returns a new BigDecimal, so this
code will not do what is intended.
This has to be one of my biggest pet peeves... it is probably the
worst named method in all of Java land.
And that means it has some stiff competition! But that is a truly
evil name for what that method actually is.
Ken
On Jan 13, 2010, at 6:53 PM, Chuck Hill wrote:
if(weight.scale() < 0)
weight.setScale(0);
return weight;
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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