The serializable class XXXX does not declare a static final serialversionuid field of Type lon

Source: Internet
Author: User

Warning about myeclips prompting the serializable class XXX does not declare a static final serialversionuid field of type long

This warning will appear when we use ipvs/myeclips. For example, this prompt is displayed after the corresponding class of the table is automatically generated when Hibernate is used. Why?

This is irrelevant to the JDK version.
That is why eclipse provides this prompt function for you.
If you click its warning icon twice, eclipse will automatically specify it.
If you don't like it, you can turn it off,
Windows-> preferences-> compiler-> error/warnings
-> Potential Programming Problems
Change the value of serializable class without serialversionuid to ignore.

In fact, if you have not considered compatibility issues, turn it off.
In fact, this function is good.
As long as the serializable interface is implemented for any category,
If serialversionuid is not added, eclipse will prompt you to warning,
This serialversionuid is compatible with the serializable type.

Consider, if your class serialized is saved to the hard drive today,
But then you changed the field of the category (increase, decrease, or rename ).
When you deserialize, exception will occur. This will cause incompatibility issues.

However, when the serialversionuid is the same, it will deserialize different fields with the default value of type.
This avoids incompatibility issues.

Since you talked about the memory problem, I don't think it's much worse.

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.