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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.4
    • 5.3
    • tapestry-ioc
    • 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.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: