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

NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • plugin-proposals
    • None

      There is a small bug in the hudson Version Number Plugin that causes the build of a job to fail if there are no existing (previous) builds and if the option "Don't increment builds today/ this month/ this year/ all time after a failed build" is activated. The cause is that the Version Number Plugin doesn't create a version number but throws a NullPointerException (visible in the Build Log).

      I looked at the source code of the plugin and discovered the problem:
      The source of the NullPointerException seems to be the call to prevBuild.getResult() if skipFailedBuilds == true and before the check if (prevBuild != null) is performed.

      I have attached a Subversion patch file that should correct this issue.

      (Couldn't select component versionnumber for this issue because it doesn't exist)

            mindless Alan Harder
            spodskubka spodskubka
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: