JavaUUID

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

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:

Links