Deserialization exception problem

Source: Internet
Author: User

Here are some summary of some of the complex objects:

L when the parent class inherits the serializable interface, all subclasses can be serialized the L subclass implements the Serializable interface, the parent class does not, the attribute in the parent class cannot be serialized (without error, the data is lost), but the attribute person in the subclass can serialize L if the serialized property is an object, this Object must also implement the Serializable interface, otherwise error l when deserializing, if the property of the object is modified or deleted, the modified part of the property will be lost, but will not error L at deserialization, if Serialversionuid is modified, then deserialization will fail L if a The parent class does not implement the Serializable interface, and if his inner class is not static, the sequence fails even if the serialized interface is implemented. Because a non-static inner class holds a type this variable that points to the parent class, all properties of the serialized class must implement the serialization interface, so setting the inner class to a static class L list or the generic type contained in the map container must also implement the Serializable interface. Otherwise it will be reported java.io.NotSerializableException

Deserialization exception problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.