Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #38 from i386/bug/JENKINS-40083
JENKINS-40083 AbstractProjectAction.getLastFinishedBuild is @exported
  • Loading branch information
uhafner committed Nov 30, 2016
2 parents 5c3e7b6 + 90dcc96 commit a2b59ce
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -483,7 +483,8 @@ protected T getResultAction(final Run<?, ?> lastRun) {
*/
@Deprecated @CheckForNull @Exported
public AbstractBuild<?, ?> getLastFinishedBuild() {
return (AbstractBuild<?, ?>) getLastFinishedRun();
Run<?, ?> lastFinishedRun = getLastFinishedRun();
return lastFinishedRun instanceof AbstractBuild ? (AbstractBuild<?, ?>) lastFinishedRun : null;
}

/**
Expand Down

0 comments on commit a2b59ce

Please sign in to comment.