Tapestry 5
  1. Tapestry 5
  2. TAP5-323

Fields marked with @Persist should not allow default values

    Details

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

      Description

      An error should be raised when a persistent field comes with inline mutable object initialization, cause the result is very surprised: the field is not in session boundary, instead visible by all requests. The bad thing is this kind of code can pass unit tests and integration tests without any warnings.

      A document is good for this issue, but it's not enough; it's hard to guarantee every developer have read that piece of ducument carefully.

        Issue Links

          Activity

          Yunhua Sang created issue -
          Geoff Callender made changes -
          Field Original Value New Value
          Link This issue duplicates TAP5-206 [ TAP5-206 ]
          Howard M. Lewis Ship made changes -
          Summary A persistent field with inline mutable object initialization should not be allowed. Fields marked with @Persist should not allow default values
          Howard M. Lewis Ship made changes -
          Resolution Fixed [ 1 ]
          Assignee Howard M. Lewis Ship [ hlship ]
          Fix Version/s 5.0.16 [ 12313427 ]
          Status Open [ 1 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development