You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Heigl (JIRA)" <ji...@apache.org> on 2019/03/10 10:37:00 UTC

[jira] [Created] (WICKET-6644) AbstractPageableView can only be serialized with Java built-in serialization

Thomas Heigl created WICKET-6644:
------------------------------------

             Summary: AbstractPageableView can only be serialized with Java built-in serialization
                 Key: WICKET-6644
                 URL: https://issues.apache.org/jira/browse/WICKET-6644
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-core
    Affects Versions: 8.3.0
            Reporter: Thomas Heigl


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 {{readResolve}} method to correctly restore its sate.

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 that cached item count.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)