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

Fields marked with @Persist should not allow default values

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: