Browse Prior Art Database

Java SerialVersionUID Management Disclosure Number: IPCOM000244765D
Publication Date: 2016-Jan-12
Document File: 4 page(s) / 120K

Publishing Venue

The Prior Art Database


This article describs a Management solution for Java SerialVersionUID which is very important for Java Serialization technology. A function that can remind or helpe developers to update serialVersionUIDs is provided in this article. The function is fully customizable by command line interface or graphical user interface. When changed source code is being deliverid to SCM(Software Configuration Managent), a check will be executed to find serializable classes which should update serialVersionUIDs but is not, if there any than prompt warnings and options for developers to take further actions, eg. automatically increase serialVersionUID or just ignore.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 54% of the total text.

Page 01 of 4

Java SerialVersionUID Management

As we all know, Java Serialization is a very important mechanism for object persistence, and A serialVersionUID is required to distinguish serialized objects of different versions.If a serializable class does not explicitly declare a serialVersionUID, then the serialization runtime will calculate a default serialVersionUID value for that class based on various aspects of the class. However, it is strongly recommended that all serializable classes explicitly declare serialVersionUID values, since the default serialVersionUID computation is highly sensitive to class details that may vary depending on compiler implementations, and can thus result in unexpected InvalidClassExceptions during deserialization. Therefore, to guarantee a consistent serialVersionUID value across different java compiler implementations, a serializable class must declare an explicit serialVersionUID value. Under some scenarios, serialVersionUID should keep unchanged after developers changed the class for compatibility, however, but others are not. For the latter scenarios, many developers always forget to change the serialVersionUID to a new value, which may result in unpredictable logic problems and long torturous debugging.

1. Prompt warning when developer trying to deliver a changed serializable class whose serialVersionUID is not updated to SCM (Software Configuration Management).

2. Auto increase the serialVersionUID for developer if need be.

3. Customi...