Skip to content
Permalink
Browse files
Fix JENKINS-16404
Added a check for the value of getFailCount if the child
reports did not have any fails.
  • Loading branch information
slide committed Jan 26, 2013
1 parent c5a317a commit 52dae3a93c5acb1a8e0a8f3149c49a5a2c4abc2e
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/hudson/plugins/emailext/plugins/EmailTrigger.java
@@ -64,7 +64,7 @@ public boolean getDefaultSendToRequester() {
protected int getNumFailures(AbstractBuild<?, ?> build) {
AbstractTestResultAction a = build.getTestResultAction();
if (a instanceof AggregatedTestResultAction) {
int result = 0;
int result = 0;
AggregatedTestResultAction action = (AggregatedTestResultAction) a;
for (ChildReport cr : action.getChildReports()) {
if (cr.child.getParent().equals(build.getParent())) {
@@ -74,6 +74,10 @@ protected int getNumFailures(AbstractBuild<?, ?> build) {
}
}
}

if(result == 0 && action.getFailCount() > 0) {
result = action.getFailCount();
}
return result;
}
return a.getFailCount();

0 comments on commit 52dae3a

Please sign in to comment.