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

NullPointerException when Category have value : not selected


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • mantis-plugin
    • None
    • Debian x64

      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

      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.

            sogabe sogabe
            heurtemattes S├ębastien Heurtematte
            0 Vote for this issue
            0 Start watching this issue