Skip to content

Commit

Permalink
Fixing
Browse files Browse the repository at this point in the history
JENKINS-16777
ArrayIndexOutOfBoundsException when trying to publish the Jacoco report
  • Loading branch information
ognjenb committed Feb 21, 2013
1 parent 9dba407 commit f0843cc
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/main/java/hudson/plugins/jacoco/ExecutionFileLoader.java
Expand Up @@ -114,11 +114,20 @@ private IBundleCoverage analyzeStructure() throws IOException {
final Analyzer analyzer = new Analyzer(executionDataStore,
coverageBuilder);

if ((includes==null)|| ("".equals(includes[0]))) {
if (includes==null) {
String[] in = {"**"};
includes = in;
}
if ((excludes==null) || ("".equals(excludes[0]))) {
} else if (includes.length == 0) {
String[] in = {"**"};
includes = in;
} else if ((includes.length == 1) && ("".equals(includes[0]))) {
String[] in = {"**"};
includes = in;
}
if (excludes==null) {
String[] ex = {"{0}"};
excludes = ex;
} else if (excludes.length==0) {
String[] ex = {"{0}"};
excludes = ex;
}
Expand Down

0 comments on commit f0843cc

Please sign in to comment.