Tapestry 5
  1. Tapestry 5
  2. TAP5-1383

TypeCoercer should "promote" coercions to primitive types into coercions to the corresponding wrapper type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.4
    • Fix Version/s: 5.3
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      Got bit by this.

      Adding a coercion from Foo.class to boolean.class is accepted, but then passing a Foo as the test parameter of an If causes an implicit type coercion to Boolean (the wrapper class). The Foo->boolean was ignored in favor of Object>String, String->Boolean.

      TypeCoercer should either forbid coercions to primitive types, or record the coercion as coercion to the wrapper type.

        Activity

        Hide
        Hudson added a comment -

        Integrated in tapestry-5.2-freestyle #303 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/303/)
        TAP5-1383: TypeCoercer should "promote" coercions to primitive types into coercions to the corresponding wrapper type

        Show
        Hudson added a comment - Integrated in tapestry-5.2-freestyle #303 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/303/ ) TAP5-1383 : TypeCoercer should "promote" coercions to primitive types into coercions to the corresponding wrapper type

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development