Re: Postgresql + booleans = error
Re: Postgresql + booleans = error
- Subject: Re: Postgresql + booleans = error
- From: Francis Labrie <email@hidden>
- Date: Fri, 17 Feb 2006 23:23:46 -0500
Hi,
Lachlan Deck wrote:
[...]
Boolean value;
value = rec.campsiteFri();
if (value != null && value.booleanValue()) {
...
}
Don't forget to test for nulls. Otherwise the next exception you get
will be a NullPointerException.
Or you can even avoid this null pointer test with this:
if(Boolean.TRUE.equals(value)) {
...
}
Kind regards,
--
Francis Labrie
Saint-Bruno-de-Montarville, Québec, Canada
_______________________________________________
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