Uploaded image for project: 'Google Code-in'
  1. Google Code-in
  2. GCI-222

Serializable PersonMergeLog should have a version id

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      Add this line:

      private static final long serialVersionUID = 1;

      To the class https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/person/PersonMergeLog.java

      Background Information:

      A serialVersionUID field is required in all Serializable classes. If you do not provide one, one will be calculated for you by the compiler. The danger in not explicitly choosing the value is that when the class changes, the compiler will generate an entirely new id, and you will be suddenly unable to deserialize (read from file) objects that were serialized with the previous version of the class.
      serialVersionUID's should be declared with all of these modifiers: static final long.

        Attachments

          Activity

            People

            Assignee:
            anuar2k Aleksander W
            Reporter:
            dkayiwa Daniel Kayiwa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: