• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • 1.480.3

      java -jar jenkins-cli.jar build -s currently-disabled-job throws an error:

      java.lang.NullPointerException
              at hudson.cli.BuildCommand.run(BuildCommand.java:135)
      

      The reason is that AbstractProject.scheduleBuild2 can return null, though it is not yet marked @CheckForNull.

      The CLI command should instead fail with a polite message saying that a build could not be scheduled. (The project being disabled is the most likely cause, though there may be others as well.)

          [JENKINS-17603] NPE trying to use CLI to build disabled job

          Jesse Glick created issue -
          Laurence North made changes -
          Assignee New: Laurence North [ lnorth ]

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/cli/BuildCommand.java
          core/src/main/java/hudson/model/Job.java
          core/src/main/resources/hudson/cli/Messages.properties
          http://jenkins-ci.org/commit/jenkins/1623160e6b2f0af1e5e119630c3db648142a653f
          Log:
          Merge pull request #919 from LarryNorth/JENKINS-17603

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/cli/BuildCommand.java core/src/main/java/hudson/model/Job.java core/src/main/resources/hudson/cli/Messages.properties http://jenkins-ci.org/commit/jenkins/1623160e6b2f0af1e5e119630c3db648142a653f Log: Merge pull request #919 from LarryNorth/ JENKINS-17603

          Oleg Nenashev added a comment -

          Seems to be fixed in jenkins-1.531

          Oleg Nenashev added a comment - Seems to be fixed in jenkins-1.531
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 148782 ] New: JNJira + In-Review [ 192872 ]

            lnorth Laurence North
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: