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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: