Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

[FIXED JENKINS-32717] fix directory separator bug #68

Merged
merged 1 commit into from
Feb 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
Original file line number Diff line number Diff line change
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