前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >serialized objects

serialized objects

作者头像
全栈程序员站长
发布2022-07-02 16:53:42
2110
发布2022-07-02 16:53:42
举报

大家好,又见面了,我是你们的朋友全栈君。This started again… a thread from *****:

What do you consider a best practice for serialVersionUID?

T

______________________________________________ From: ******* Sent: Thursday, November 15, 2007 10:45 AM To: ******* Cc: ******* Subject: serilaVersionUID

Hi, *****, I realized that you changed the servialVersionUID in 11 TOs and make them unique. What is the purpose to make them unique?

Once the serilaVersionUID in TO is modified, both BPM and rule engine has to be deployed again. Now Dev rule engine is broken, and I am afraid Dev BPM (if it is running) also need redeploy.

*******

So after doing research again here is what I (*****) thinks:

The purpose of the serialVersionUID is to give the developer the control of when a class is compatible with previous versions and when not. The consequence of this is that when the class changes, the developer needs to check that if the new class has compatible changes with previous versions, then keep the same number, if changes are not compatible, then change the number. you can use the command: serialver to generate a serial version uid. Articles:

[url=http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-control.html?page=1]JavaWorld[/url] [url=http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/class.html#5421]Java Object Serialization Specification version 1.5.0[/url]

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/148527.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档