• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Postgresql + booleans = error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Postgresql + booleans = error (From: Randall Perry <email@hidden>)
 >Re: Postgresql + booleans = error (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Efficient qualifier for to-many relationships?
  • Next by Date: Re: WOXMLDecoder and mapping files
  • Previous by thread: Re: Postgresql + booleans = error
  • Next by thread: Re: Postgresql + booleans = error
  • Index(es):
    • Date
    • Thread