Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-731

Fix VisitAttributeType maxOccurs NullPointerException

    XMLWordPrintable

Details

    Description

      When a visit attribute type does not have the maxOccurs value, we get a NullPointerException while making a REST API call.
      As per the talk thread discussion link below, this was discovered and reported by some one who was trying to create a visit attribute via the REST API and this is the link to the stack trace: https://pastebin.com/N76rEazA

      This line needs to first test if maxOccurs is not null: https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-1.9/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_9/VisitAttributeResource1_9.java#L98

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                bisht13 Aditya Bisht
                kundan.intelehealth Kundan Sinha
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: