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

NullPointerException when calling "Issue.getAttachments()" from "Create Issue" transition

    XMLWordPrintable

Details

    Description

      Hi,

      Invoking method "com.atlassian.jira.issue.AbstractIssue.getAttachments()" from transition a validator in "Create Issue" transition throws a "java.lang.NullPointerException".

      Note that the problem appears from a validator, i.e., before execution of post-function "Creates de Issue Originally".

      I consider this is a bug, since the correct behavior should be to return attachments provided in Create Issue screen, or an empty collection. The exception is uncatched by JIRA and is shown in UI.

      The stack trace looks like this:

      2015-12-10 09:05:06,870 http-nio-8080-exec-8 ERROR admin 545x199x1 1u7yt9q 0:0:0:0:0:0:0:1 /secure/CreateIssueDetails.jspa [c.f.j.p.workflowToolbox.shared.Parser] *** NullPointerException: null
      java.lang.NullPointerException
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getStoredAttachments(DefaultAttachmentManager.java:191)
      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.getAttachments(DefaultAttachmentManager.java:185)
      at com.atlassian.jira.issue.AbstractIssue.getAttachments(AbstractIssue.java:71)
      at com.fca.jira.plugins.workflowToolbox.shared.AttachmentsHelper.getConsolidatedGeneralizedAttachments(AttachmentsHelper.java:74)
      at com.fca.jira.plugins.workflowToolbox.shared.AttachmentsHelper.getAllAttachments(AttachmentsHelper.java:34)
      at com.fca.jira.plugins.workflowToolbox.shared.GeneralizedField.getValue(GeneralizedField.java:2651)
      .....

      The last calls are from JIRA Workflow Toolbox plugin, which I develop.

      Thanks,

      Fidel

      Attachments

        Activity

          People

            Unassigned Unassigned
            799e74df6e6b Fidel Castro
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: