Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6644

AbstractPageableView can only be serialized with Java built-in serialization

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.3.0
    • Fix Version/s: 9.0.0-M1, 8.4.0
    • Component/s: wicket-core
    • Labels:
      None

      Description

      I'm in the progress of replacing FST serialization, that we have used in production for years, with Kryo.

      FST is a drop-in replacement for Java's built-in serialization and respects the readObject/writeObject contract. Kryo does not rely on Java serialization at all.

      All of Wicket's classes can be serialized with recent versions of Kryo without problems, but when I did some exploratory testing, I noticed that all our pageable lists were empty after deserialization.

      After some investigation, I found the root cause of this: WICKET-1323

      AbstractPageableView is the only class in Wicket that relies a custom readObject method to correctly restore its state.

      I propose to get rid of this method and simply initialize the transient field to a default value of -1 or use a Long instead of a long to represent the cached item count.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                svenmeier Sven Meier
                Reporter:
                thomas.heigl Thomas Heigl
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: