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

        Alexander Gavrilov created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Fix Version/s 5.0.12 [ 12313048 ]
        Fix Version/s 5.0.13 [ 12313205 ]
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.0 [ 12312018 ]
        Fix Version/s 5.0.13 [ 12313205 ]
        Howard M. Lewis Ship made changes -
        Key TAPESTRY-2402 TAP5-98
        Fix Version/s 5.0 [ 12312018 ]
        Issue Type Improvement [ 4 ] Bug [ 1 ]
        Project Tapestry [ 10573 ] Tapestry 5 [ 12310833 ]
        Affects Version/s 5.0.11 [ 12312968 ]
        Howard M. Lewis Ship made changes -
        Affects Version/s 5.0.15 [ 12313429 ]
        Howard M. Lewis Ship made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        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.
        Howard M. Lewis Ship made changes -
        Summary Tapestry should be smarter about coersing string literals to Enum's The TypeCoercer should be able to coerce String to Enum types, even without a specific contribution
        Component/s tapestry-ioc [ 12312469 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.3.0 [ 12316023 ]
        Resolution Fixed [ 1 ]
        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
        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/ )
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.3 [ 12316024 ]
        Fix Version/s 5.3.0 [ 12316023 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1065d 8h 20m 1 Howard M. Lewis Ship 02/Apr/11 01:39
        In Progress In Progress Closed Closed
        1d 18h 7m 1 Howard M. Lewis Ship 03/Apr/11 19:46

          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