Sébastien Heurtematte created JENKINS-13215:
-----------------------------------------------

             Summary: NullPointerException when Category have value : not 
selected
                 Key: JENKINS-13215
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13215
             Project: Jenkins
          Issue Type: Bug
          Components: mantis
    Affects Versions: current
         Environment: Debian x64
            Reporter: Sébastien Heurtematte
            Assignee: sogabe


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to