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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.3.2
    • Fix Version/s: 5.3.3, 5.4
    • Component/s: tapestry-ioc
    • Labels:

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Jerome Alberto
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development