Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1236

Trinidad should be able to state save non-Serializable Lists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.9-core, 1.2.9-core
    • 1.2.10-core, 1.0.10-core
    • Components
    • None
    • Any environment in which the TreeState is Serialized and a non-Serializable List implementation (such as SubList) is used. For example, client state saving or High Availability environments.

    Description

      Trinidad supports state saving of component attributes by delegating to the PropertyKey implementations. For non-CAP_STATE_HOLDER, non CAP_LIST attributes, the PropertyKey assumes that simply returning the value is sufficient. If the value is Serializable, this is sufficient to support client-state saving and fail over. However, if the value is not-Serializable the Serialization process will fail when it is attempt. In particular, a problem can occur with List.class (as opposed to CAP_LIST) PropertyKeys with a non-Serializable implementation. While most common List implementations are Serializable, the implementations that AbstractList uses to implement sublist() are not.

      The proposal is to change the default PropertyKey saveValue()/restoreValue() implementations to always use StateUtils.saveList(context, value); for PropertyKey's of type List.class when the instance is not a ValueExpression. Note that this won't help the more general case where the PropertyKey is of type Object.class and a List instance is used for the property value

      Attachments

        1. jira1236Trunk.patch
          3 kB
          Blake Sullivan
        2. jira1236_1291.patch
          3 kB
          Blake Sullivan

        Activity

          People

            jeanne.waldman@oracle.com Jeanne Waldman
            btsulliv Blake Sullivan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified