Skip to content

Commit

Permalink
Fix JENKINS-15006 and JENKINS-14628
Browse files Browse the repository at this point in the history
  • Loading branch information
gboissinot committed Aug 31, 2012
1 parent b6bdad5 commit 3ec3af4
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -20,6 +20,7 @@
import hudson.tasks.junit.TestResult;
import hudson.tasks.junit.TestResultAction;
import hudson.tasks.test.TestResultProjectAction;
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.types.FileSet;
Expand Down Expand Up @@ -435,7 +436,13 @@ public Publisher newInstance(StaplerRequest req, JSONObject formData) throws For
req, formData, "tools", getListXUnitTypeDescriptors());
List<XUnitThreshold> thresholds = Descriptor.newInstancesFromHeteroList(
req, formData, "thresholds", getListXUnitThresholdDescriptors());
int thresholdMode = formData.getInt("thresholdMode");
int thresholdMode = 0;
try{
thresholdMode = formData.getInt("thresholdMode");
}
catch (JSONException e){
//ignore
}
return new XUnitPublisher(types.toArray(new TestType[types.size()]), thresholds.toArray(new XUnitThreshold[thresholds.size()]), thresholdMode);
}
}
Expand Down

0 comments on commit 3ec3af4

Please sign in to comment.