SerialVersionUID… why bothering?

February 25, 2009 – 12:58 pm by Alessio SOLDANO
Share

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 ;-)

 
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • Technorati
  • YahooMyWeb
  • LinkedIn
  • StumbleUpon
  • TwitThis
  • Wikio

Post a Comment