Title: Fix serialization format
Type: Severity: normal
Components: Core Versions: Jython 2.7.2
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: doublep
Priority: Keywords:

Created on 2020-06-04.12:29:04 by doublep, last changed 2020-06-04.12:29:04 by doublep.

msg13098 (view) Author: (doublep) Date: 2020-06-04.12:29:04
Recently our application upgraded from Jython 2.5 to 2.7.2. As a side effect, all previously stored serialization representations (e.g. of PyList) became unreadable. This is caused by internal change in representation of various Jython objects. Note that using 'pickle' in our case is not an option, because we are serializing Java objects that _sometimes_ also include Jython objects, but Jython is not the main target.

However, additionally Jython classes lack 'serialVersionUID' field. Which means that even changes that are serialization-compatible in principle could lead to accidental change of autocomputed UID value and thus break unserialization of older representations.

Please add 'serialVersionUID' to serializable classes (initializing it to the current autocomputed value). Also, please weigh serialization compatibility against other reasons if considering changing internal object structure again.
Date User Action Args
2020-06-04 12:29:04doublepcreate