mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-09 18:16:10 +00:00
[FIXED HUDSON-4177] getResult() is null by default again - no actual live code depended on it being set, as it turned out. Also added integration test for this use case.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20654 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
3b6c5c921e
commit
9da4ce71a2
3 files changed
+21
-4
No files matched your search
@@ -1186,9 +1186,6 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
|
||||
*/
|
||||
protected void onStartBuilding() {
|
||||
state = State.BUILDING;
|
||||
// start with the best possible value, and code that calls setResult() can progressively set
|
||||
// worse results.
|
||||
result = Result.SUCCESS;
|
||||
RunnerStack.INSTANCE.push(runner);
|
||||
}
|
||||
|
||||
@@ -1206,6 +1203,11 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
|
||||
}
|
||||
runner = null;
|
||||
RunnerStack.INSTANCE.pop();
|
||||
if (result==null) {
|
||||
result = Result.FAILURE;
|
||||
LOGGER.warning(toString()+": No build result is set, so marking as failure. This shouldn't happen.");
|
||||
}
|
||||
|
||||
RunListener.fireFinalized(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user