• 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: BigDecimal vs WOConditional
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BigDecimal vs WOConditional


  • Subject: Re: BigDecimal vs WOConditional
  • From: Stamenkovic Florijan <email@hidden>
  • Date: Tue, 17 Feb 2009 13:20:07 -0400


On Feb 17, 2009, at 12:57, Ondřej Čada wrote:

Just bumped into a ugly thing: a WOConditional considers a BigDecimal 'false' for values < 1 -- self-evidently, it checks an integer value of the thing.

Just for reference, is that my fault or WO fault? To be quite frank, I cannot find in specifications the exact API contract for this... I've always thought the C rules apply there (i.e., for any numeric value, nonzero equals true), but quite clearly they do not :(

The Java language specification does not allow conversion of non- boolean primitives to boolean primitives. The java.lang.Number API is consistent with this: it does not have a boolean-export method. In short: there is no contract for this. So, if it is happening, it is a library-specific process, so I guess we just have to accept whatever WO (in this case) does.


F _______________________________________________
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


  • Follow-Ups:
    • Re: BigDecimal vs WOConditional
      • From: Ondřej Čada <email@hidden>
References: 
 >BigDecimal vs WOConditional (From: Ondřej Čada <email@hidden>)

  • Prev by Date: Re: BigDecimal vs WOConditional
  • Next by Date: Re: ADC / WO after 5.4 and NDA
  • Previous by thread: Re: BigDecimal vs WOConditional
  • Next by thread: Re: BigDecimal vs WOConditional
  • Index(es):
    • Date
    • Thread