Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5195

Do not use nullSafeEquals in ConceptName enum comparisons

    Details

    • Type: Task
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.2.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      There are a few instances of convenience methods like

      	public Boolean isFullySpecifiedName() {
      		return OpenmrsUtil.nullSafeEquals(getConceptNameType(), ConceptNameType.FULLY_SPECIFIED);
      

      which check if a field is equal to a specific enum value.

      We use OpenmrsUtil.nullSafeEquals() although the field is an enum and we can achieve the same by doing the reverse & using equals

      ConceptNameType.FULLY_SPECIFIED.equals(getConceptNameType())
      

        Attachments

          Activity

            People

            • Assignee:
              manuelagrindei Manuela Lidia Grindei
              Reporter:
              teleivo Ivo Ulrich
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: