Tapestry 5
  1. Tapestry 5
  2. TAP5-98

The TypeCoercer should be able to coerce String to Enum types, even without a specific contribution

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.15
    • Fix Version/s: 5.3
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      In the current implementation to allow coersion form string literal to Enum we need to add contribution to the TypeCoercer. This is working. But this coersion can be performed by default using just Enum.valueOf (Class, String), so there are not required to register new coersion for every used enum type. In this case whe are lost the case insensibility of enum coersions, but if this is meaningfull for everyone we can still use contributed coersions, and if no one is found fallback do the default. Enum.valueOf

        Activity

        Hide
        Hudson added a comment -

        Integrated in tapestry-5.2-freestyle #306 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/306/)

        Show
        Hudson added a comment - Integrated in tapestry-5.2-freestyle #306 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/306/ )
        Hide
        Hudson added a comment -

        Integrated in tapestry-5.2-freestyle #304 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/304/)
        TAP5-98: The TypeCoercer should be able to coerce String to Enum types, even without a specific contribution
        TAP5-98: Move StringToEnumCoercion from tapestry-core to tapestry-ioc

        Show
        Hudson added a comment - Integrated in tapestry-5.2-freestyle #304 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/304/ ) TAP5-98 : The TypeCoercer should be able to coerce String to Enum types, even without a specific contribution TAP5-98 : Move StringToEnumCoercion from tapestry-core to tapestry-ioc
        Hide
        Howard M. Lewis Ship added a comment -

        Tricky to do this in a way that is both thread safe, and will not cause memory leaks if the Enum type is loaded from a reloadable class loader.

        Show
        Howard M. Lewis Ship added a comment - Tricky to do this in a way that is both thread safe, and will not cause memory leaks if the Enum type is loaded from a reloadable class loader.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development