OpenMRS

Serializable GlobalProperty should have a version id

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/GlobalProperty.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.

Task tags

  • once-per-student
  • java

Students who completed this task

akshatj01

Task type

  • code Code
close

2018