Skip to content

Commit

Permalink
Merge pull request #158 from sghill/bugfix/npe
Browse files Browse the repository at this point in the history
Handle case where last completed build does not have RebuildAction
  • Loading branch information
hagzag authored Mar 31, 2024
2 parents 645b7df + 67fe5fc commit a1ee476
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public String getUrlName() {
final Run<?, ?> lastCompletedBuild = project.getLastCompletedBuild();
if (lastCompletedBuild != null) {
final RebuildAction action = lastCompletedBuild.getAction(RebuildAction.class);
if (action == null) {
return null;
}
// TODO This will have unexpected results if the job configuration changed between link rendering
// and when the user clicks. Seems preferable to rebuilding a "wrong" build (finished since link was
// rendered though).
Expand Down

0 comments on commit a1ee476

Please sign in to comment.