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

NullPointerException when Category have value : not selected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: mantis-plugin
    • Labels:
      None
    • Environment:
      Debian x64
    • Similar Issues:

      Description

      In the project configuration of a job, when you don't select Mantis Project and/or Category.
      and choose to activate the option : "File a ticket to Mantis"
      a NullPointerException is thrown

      java.lang.NullPointerException
      at hudson.plugins.mantis.soap.mantis120.MantisSessionImpl.addIssue(MantisSessionImpl.java:134)
      at hudson.plugins.mantis.MantisSite.addIssue(MantisSite.java:173)
      at hudson.plugins.mantis.MantisIssueRegister.perform(MantisIssueRegister.java:74)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.post2(IvyModuleSetBuild.java:587)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
      at hudson.model.Run.run(Run.java:1435)
      at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:282)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)

      The problem become from the class : MantisIssueRegister.createIssue
      Where this test exist :
      if (projectId == MantisProject.NONE || MantisCategory.None.equals(categoryName)) {
      return null;
      }

      Is it possible to have just a log message maybe first.
      And after, a required field on project configuration and the ability to have category field : not selected
      if there is no impact on the rest of the plugin.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          src/main/java/hudson/plugins/mantis/MantisIssueRegister.java
          src/main/java/hudson/plugins/mantis/soap/mantis110/MantisSessionImpl.java
          src/main/java/hudson/plugins/mantis/soap/mantis120/MantisSessionImpl.java
          http://jenkins-ci.org/commit/mantis-plugin/b8b2540185c51f50c93537ac36304a5185e544b9
          Log:
          [FIXED JENKINS-13215] NullPointerException when Category have value : not selected.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: src/main/java/hudson/plugins/mantis/MantisIssueRegister.java src/main/java/hudson/plugins/mantis/soap/mantis110/MantisSessionImpl.java src/main/java/hudson/plugins/mantis/soap/mantis120/MantisSessionImpl.java http://jenkins-ci.org/commit/mantis-plugin/b8b2540185c51f50c93537ac36304a5185e544b9 Log: [FIXED JENKINS-13215] NullPointerException when Category have value : not selected.
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_mantis #56
          [FIXED JENKINS-13215] NullPointerException when Category have value : not selected. (Revision b8b2540185c51f50c93537ac36304a5185e544b9)

          Result = SUCCESS
          Seiji Sogabe :
          Files :

          • src/main/java/hudson/plugins/mantis/soap/mantis120/MantisSessionImpl.java
          • src/main/java/hudson/plugins/mantis/MantisIssueRegister.java
          • src/main/java/hudson/plugins/mantis/soap/mantis110/MantisSessionImpl.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_mantis #56 [FIXED JENKINS-13215] NullPointerException when Category have value : not selected. (Revision b8b2540185c51f50c93537ac36304a5185e544b9) Result = SUCCESS Seiji Sogabe : Files : src/main/java/hudson/plugins/mantis/soap/mantis120/MantisSessionImpl.java src/main/java/hudson/plugins/mantis/MantisIssueRegister.java src/main/java/hudson/plugins/mantis/soap/mantis110/MantisSessionImpl.java

            People

            Assignee:
            sogabe sogabe
            Reporter:
            heurtemattes S├ębastien Heurtematte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: