This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
If you explicitly put such a field into a serializable class, then you can use it to provide versioning for serialized data files containing this class. Class versions with the same SerialVersionUID have compatible serialized data, by definition, even if the class changes.
But if this doesn't matter to you, then just ignore the warning.
For your information: in Eclipse you can change the importance of compile errors/warnings to your taste by Window - Preferences - Java - Compiler - Errors/Warnings. Specific this one can be found in the group called "Potential programming problems".
Disabling it might cause trouble down the road. If you mean to serialize an object the warnings will help you remember.
You can keep the warning turned on and either ignore it or get it out of sight by placing this line above public class ... : @SuppressWarnings("serial")
Siegfried Heintze
Ranch Hand
Joined: Aug 11, 2000
Posts: 359
posted
0
Does someone have a favorite URL/tutorial that describes how one uses this unique value for versioning with serialization?
Thanks, Siegfried
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: The serializable class does not declare a static final serialVersionUID field