SerialVersionUID… why bothering?

The Foo class does not declare a static final serialVersionUID field of type long

Why bothering adding that field? What value should it be given? Should it be ever updated? If yes, when?

Junior java developer often underestimate this warning…I know because it happened to me too in the past ;-)

Well, before finding out (perhaps in QA phase) that the great new version of your software can not communicate with previous ones… spend some minutes reading the following pages:

Finally… always declare the serialVersionUID when required… it can save you from issues in the future ;-)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>