Skip to content

Commit

Permalink
[JENKINS-17037] added message if clover xml is incompatible with clov…
Browse files Browse the repository at this point in the history
…er style
  • Loading branch information
ssogabe committed Mar 13, 2013
1 parent 8daa40a commit c70e441
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -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);
}
Expand Down
Expand Up @@ -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);

Expand Down

0 comments on commit c70e441

Please sign in to comment.