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

Comparators should be "Serializable"

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Labels:
    • Complexity:
      Low

      Description

      Implement Serializable for these classes:

      ProviderByPersonNameComparator.java, PersonByNameComparator.java, UserByNameComparator.java, PatientIdentifierTypeDefaultComparator.java, MetadataComparator.java, PersonName.java, DrugsByNameComparator.java, PersonAttributeType.java, ConceptMapTypeComparator.java, PersonAttribute.java, VersionComparator.java, PatientIdentifier.java, FormField.java

      Background information:

      These classes implement the Comparator interface. You should also implement the Serializable interface. If a comparator is used to construct an ordered collection such as a TreeMap, then the TreeMap will be serializable only if the comparator is also serializable. As most comparators have little or no state, making them serializable is generally easy and good defensive programming.
      
      A non-serializable Comparator can prevent an otherwise-Serializable ordered collection from being serializable. Since the overhead to make a Comparator serializable is usually low, doing so can be considered good defensive programming.

        Attachments

          Activity

            People

            Assignee:
            Navareth Bartłomiej Rasztabiga
            Reporter:
            dkayiwa Daniel Kayiwa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: