Difference between revisions of "JavaUUID"
From ADempiere
This Wiki is read-only for reference purposes to avoid broken links.
m (update revision) |
m |
||
Line 17: | Line 17: | ||
References: | References: | ||
− | * Java | + | * Java Spec: http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#5172 |
* Forum Thread: https://sourceforge.net/forum/forum.php?thread_id=3185123&forum_id=610548 | * Forum Thread: https://sourceforge.net/forum/forum.php?thread_id=3185123&forum_id=610548 | ||
* Tracker: https://sourceforge.net/tracker/?func=detail&aid=2740259&group_id=176962&atid=879332 | * Tracker: https://sourceforge.net/tracker/?func=detail&aid=2740259&group_id=176962&atid=879332 |
Revision as of 05:50, 14 April 2009
We conformed with Java 6 Spec by adding serialised uuid's to java classes in rev 8996
This helps to control serialised classes which may not be backward compatible. Whenever there is a risk of this, we should change the uuid in the relevant class.
Summarised by Carlos Ruiz:
The developer needs to regenerate the serialversionID when:
- Deleting fields
- Moving classes up or down the hierarchy
- Changing a nonstatic field to static or a nontransient field to transient
- Changing the declared type of a primitive field
- Changing the writeObject or readObject method
- Changing a class from Serializable to Externalizable or vice versa
- Changing a class from a non-enum type to an enum type or vice versa
- Removing either Serializable or Externalizable
- Adding the writeReplace or readResolve method
References: