Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1881

TypeCoercion from Number to Boolean returns false for any number that is an even multiple of 256

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 5.3.2
    • 5.3.3, 5.4
    • tapestry-ioc

    Description

      At the moment the coercion from Number to Boolean is implemented as

      public Boolean coerce(Number input)
      {
      return input.byteValue() != 0;
      }

      It should be

      public Boolean coerce(Number input)
      {
      return input.longValue() != 0;
      }

      All numbers (e.g. longs, integers, shorts) will be coerced to false if the number modulo 256 is zero.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            tux4ever Jerome Alberto
            Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: