Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-29298

ChangeHistory#getChangeItems() can return null and is unsafe

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 5.1.3, 5.2-m03
    • 5.0
    • None

    Description

      GreenHopper code is littered with usage of ChangeHistory#getChangeItems() directly inside loop statements (i.e. without null check). When JIRA data is in a certain state as a result of being from a very old version of JIRA (e.g. on JAC), this call can lead to null being returned instead of an empty list.

      We should safeguard against this in JIRA so that consumers of the API are not adversely affected. We should also mention this in the Javadoc.

      Additionally, it would be nice if the ChangeHistory class was actually an interface.

      (Discovered as part of bug GHS-5394)

      Attachments

        Issue Links

          Activity

            People

              edalgliesh Eric Dalgliesh
              mtokar Michael Tokar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: