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

NullPointerException with no mantis references

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: mantis-plugin
    • Labels:
      None
    • Environment:
      Platform: PC, OS: Windows 2000

      Description

      Using Mantis plugin 0.5, when there are no mantis references, I get a
      NullPointerException.

      (from Console after main build completes)

      FATAL: null
      java.lang.NullPointerException
      at hudson.plugins.mantis.Updater.findIssuesIds(Updater.java:135)
      at hudson.plugins.mantis.Updater.findIssueIdsRecursive(Updater.java:109)
      at hudson.plugins.mantis.Updater.perform(Updater.java:50)
      at hudson.plugins.mantis.MantisIssueUpdater.perform(MantisIssueUpdater.java:44)
      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:309)
      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:297)
      at hudson.model.Build$RunnerImpl.post2(Build.java:118)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:282)
      at hudson.model.Run.run(Run.java:796)
      at hudson.model.Build.run(Build.java:85)
      at hudson.model.ResourceController.execute(ResourceController.java:70)
      at hudson.model.Executor.run(Executor.java:88)

      (the total summary of changes was, ie. no mantis references

      Changes
      1. beem on 03/09/2008 08:23:31
      [The file was modified]
      DelphiProjects1\InstallationSoftware\Code\NodeDialogs\CIS_TNetworkNodeHelper.pas@\main\wombat2\beem_wombat2_dev\4

      • create version

        Activity

        Hide
        sogabe sogabe added a comment -

        What "Issue ID pattern" are you using?

        Show
        sogabe sogabe added a comment - What "Issue ID pattern" are you using?
        Hide
        djcarr djcarr added a comment -

        Ahh the new "Issue Id Pattern" field in my projects is blank - I never edited my
        project configurations after upgrading to v0.5.

        Could it instead of an exception show an error such as "blank Issue ID pattern"
        or something, so we know where to look?

        And (if possible) make existing projects default to the original setting of
        "issue #xxxx", for backwards compatibility.

        Thanks for looking into this

        Show
        djcarr djcarr added a comment - Ahh the new "Issue Id Pattern" field in my projects is blank - I never edited my project configurations after upgrading to v0.5. Could it instead of an exception show an error such as "blank Issue ID pattern" or something, so we know where to look? And (if possible) make existing projects default to the original setting of "issue #xxxx", for backwards compatibility. Thanks for looking into this
        Hide
        djcarr djcarr added a comment -

        Just another small note...the help comment for "Issue ID Pattern" says:

        This is the pattern used to match issue IDs in SCM changeset comments. Enter the
        pattern in the correct format, for example "[ISSUE: %ID%]", "ID %ID%" and so on.
        "%ID%" is the placeholder that means Mantis issue ID. If empty, "issue %ID%"
        will be used.

        However - its not clear if %ID% will include the # that normally prefixes an
        issue id... that is, do we need to use "issue %ID%" or "issue #%ID%" to achieve
        the original behaviour that we had before?

        Show
        djcarr djcarr added a comment - Just another small note...the help comment for "Issue ID Pattern" says: This is the pattern used to match issue IDs in SCM changeset comments. Enter the pattern in the correct format, for example " [ISSUE: %ID%] ", "ID %ID%" and so on. "%ID%" is the placeholder that means Mantis issue ID. If empty, "issue %ID%" will be used. However - its not clear if %ID% will include the # that normally prefixes an issue id... that is, do we need to use "issue %ID%" or "issue #%ID%" to achieve the original behaviour that we had before?
        Hide
        sogabe sogabe added a comment -

        > And (if possible) make existing projects default to the original setting of
        > "issue #xxxx", for backwards compatibility.

        If "Isuue Pattern Id" is empty, "issue %ID%" will be used...

        >However - its not clear if %ID% will include the # that normally prefixes an
        >issue id... that is, do we need to use "issue %ID%" or "issue #%ID%" to achieve
        >the original behaviour that we had before?

        %ID% does'nt include "#", so use "issue #%ID%".

        I don't know why NPE is thrown when project configuration isn't edited.
        I'm going to look into this.

        Thanks.

        Show
        sogabe sogabe added a comment - > And (if possible) make existing projects default to the original setting of > "issue #xxxx", for backwards compatibility. If "Isuue Pattern Id" is empty, "issue %ID%" will be used... >However - its not clear if %ID% will include the # that normally prefixes an >issue id... that is, do we need to use "issue %ID%" or "issue #%ID%" to achieve >the original behaviour that we had before? %ID% does'nt include "#", so use "issue #%ID%". I don't know why NPE is thrown when project configuration isn't edited. I'm going to look into this. Thanks.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : sogabe
        Path:
        trunk/hudson/plugins/mantis/src/main/java/hudson/plugins/mantis/MantisProjectProperty.java
        http://fisheye4.cenqua.com/changelog/hudson/?cs=11985
        Log:
        JENKINS-2307 Use default issue id pattern if project configuration has not saved after upgrading

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : sogabe Path: trunk/hudson/plugins/mantis/src/main/java/hudson/plugins/mantis/MantisProjectProperty.java http://fisheye4.cenqua.com/changelog/hudson/?cs=11985 Log: JENKINS-2307 Use default issue id pattern if project configuration has not saved after upgrading
        Hide
        sogabe sogabe added a comment -

        Fixed in 0.5.2

        Show
        sogabe sogabe added a comment - Fixed in 0.5.2

          People

          • Assignee:
            sogabe sogabe
            Reporter:
            djcarr djcarr
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: