Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
8.3.0
-
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
- is caused by
-
WICKET-1323 AbstractPageableView has transient cachedItemCount, but doesn't set it to -1 on deserialization.
- Closed
- relates to
-
WICKET-6554 Remove dependency on Java serialization
- Open