Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use TestObject.getRun in buildUpInitialHistory
On pipeline jobs, the call to deprecated API TestObject.getOwner() returns null, as reported on https://issues.jenkins-ci.org/browse/JENKINS-36504 .

This causes an NPE on previousResult.getOwner().getNumber() ; using TestObject.getRun() avoid this issue.
  • Loading branch information
nostalic committed Mar 24, 2017
1 parent a7166ab commit 0d3b93a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -145,7 +145,7 @@ private void buildUpInitialHistory(CircularStabilityHistory ringBuffer, hudson.t
hudson.tasks.test.TestResult previousResult = getPreviousResult(result);
while (previousResult != null) {
testResultsFromNewestToOldest.add(
new Result(previousResult.getOwner().getNumber(), previousResult.isPassed()));
new Result(previousResult.getRun().getNumber(), previousResult.isPassed()));
previousResult = previousResult.getPreviousResult();
}

Expand Down

0 comments on commit 0d3b93a

Please sign in to comment.