• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding stream unique identifiers  RSS feed

 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I have specified serial version UID number explicitly by declaring a static final long field named serialVersionUID in a class and i serialized the class.After long time, I have changed the declared type of an instance variable and non-transient instance variable to transient but serialVersionUID is same.my question is Will it be deserialized?
 
fundoo anshu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. It will throw exception while deserializing.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The non-transient to transient will not be a big issue, but the changed type will. But why not test it for yourself?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!