Skip to content

Commit

Permalink
[FIXED JENKINS-32717] fix directory separator bug
Browse files Browse the repository at this point in the history
  • Loading branch information
csimons committed Feb 4, 2016
1 parent f97e473 commit a614cfb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
Expand Up @@ -76,6 +76,7 @@ public class JacocoPublisher extends Recorder {
private final String maximumClassCoverage;
private final boolean changeBuildStatus;

private static final String DIR_SEP = "\\s*,\\s*";

/**
* Loads the configuration set by user.
Expand Down Expand Up @@ -269,7 +270,7 @@ protected static FilePath[] resolveDirPaths(AbstractBuild<?, ?> build, BuildList
public FilePath[] invoke(File f, VirtualChannel channel) throws IOException {
FilePath base = new FilePath(f);
ArrayList<FilePath> localDirectoryPaths= new ArrayList<FilePath>();
String[] includes = input.split(",");
String[] includes = input.split(DIR_SEP);
DirectoryScanner ds = new DirectoryScanner();

ds.setIncludes(includes);
Expand Down Expand Up @@ -359,12 +360,12 @@ public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListene
logger.println("\n[JaCoCo plugin] Loading inclusions files..");
String[] includes = {};
if (inclusionPattern != null) {
includes = inclusionPattern.split(",");
includes = inclusionPattern.split(DIR_SEP);
logger.println("[JaCoCo plugin] inclusions: " + Arrays.toString(includes));
}
String[] excludes = {};
if (exclusionPattern != null) {
excludes = exclusionPattern.split(",");
excludes = exclusionPattern.split(DIR_SEP);
logger.println("[JaCoCo plugin] exclusions: " + Arrays.toString(excludes));
}

Expand Down

0 comments on commit a614cfb

Please sign in to comment.