Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-33942] Fixed NPE when non-exists run requested
  • Loading branch information
pjanouse committed Apr 6, 2016
1 parent 4515625 commit 575c1af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java
Expand Up @@ -28,6 +28,9 @@ public String getShortDescription() {

protected int run() throws Exception {
Run run = job.getBuildByNumber(number);
if (run == null)
throw new IllegalArgumentException("No such build #"+number);

run.checkPermission(Run.UPDATE);

if ("=".equals(description)) {
Expand Down

0 comments on commit 575c1af

Please sign in to comment.