Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27622

NPE with new custom field feature

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins version: 1.578
      Jira Issue Updater version: 1.10

      After upgrade to version 1.10, jobs that ran fine before now fail with this NPE:

      11:47:01 FATAL: null
      11:47:01 java.lang.NullPointerException
      11:47:01 	at info.bluefloyd.jenkins.IssueUpdatesBuilder.updateIssueField(IssueUpdatesBuilder.java:355)
      11:47:01 	at info.bluefloyd.jenkins.IssueUpdatesBuilder.perform(IssueUpdatesBuilder.java:225)
      11:47:01 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      11:47:01 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      11:47:01 	at hudson.model.Build$BuildExecution.build(Build.java:199)
      11:47:01 	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      11:47:01 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      11:47:01 	at hudson.model.Run.execute(Run.java:1740)
      11:47:01 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      11:47:01 	at hudson.model.ResourceController.execute(ResourceController.java:89)
      11:47:01 	at hudson.model.Executor.run(Executor.java:240)
      

      Looks like this commit doesn't check whether a custom field id is not null, before trying to use it:

      https://github.com/jenkinsci/jira-issue-updater-plugin/commit/a9bfbc844964eac69182ff6549b09d376a494a03

      Specifically here:

      https://github.com/jenkinsci/jira-issue-updater-plugin/blob/master/src/main/java/info/bluefloyd/jenkins/IssueUpdatesBuilder.java#L355

            markleith Mark Leith
            markleith Mark Leith
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: