Skip to content
Permalink
Browse files
[JENKINS-17037] added message if clover xml is incompatible with clov…
…er style
  • Loading branch information
ssogabe committed Mar 13, 2013
1 parent 8daa40a commit c70e441c6671816e2085c7e12d513512e2a85ab6
@@ -84,7 +84,11 @@ public static ProjectCoverage parse(InputStream in) throws IOException {
digester.addSetNext("coverage/project/file/class", "addClassCoverage", ClassCoverage.class.getName());

try {
return (ProjectCoverage) digester.parse(in);
ProjectCoverage coverage = (ProjectCoverage) digester.parse(in);
if (coverage == null) {
throw new IOException("coverage report seems to be incompatible with clover style.");
}
return coverage;
} catch (SAXException e) {
throw new IOException2("Cannot parse coverage results", e);
}
@@ -218,6 +218,7 @@ private void processCloverXml(AbstractBuild<?, ?> build, BuildListener listener,
Util.displayIOException(e, listener);
e.printStackTrace(listener.fatalError("Unable to parse " + cloverXmlReport));
build.setResult(Result.FAILURE);
result = new ProjectCoverage();
}
final CloverBuildAction action = CloverBuildAction.load(build, workspacePath, result, healthyTarget, unhealthyTarget);

0 comments on commit c70e441

Please sign in to comment.