Skip to content

Commit

Permalink
replace fixed path separator by File.pathSeparator
Browse files Browse the repository at this point in the history
This fixes sdaschner#100 Javadoc analysis fails on Windows
  • Loading branch information
vboerchers committed Jan 16, 2017
1 parent 8bda450 commit a80d66e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.MethodDoc;

import java.io.File;
import java.nio.charset.Charset;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -60,7 +61,7 @@ private void invokeDoclet(final Set<String> packages, final Set<Path> projectSou
}

private String joinPaths(final Set<Path> projectSourcePaths) {
return projectSourcePaths.stream().map(Path::toString).collect(Collectors.joining(":"));
return projectSourcePaths.stream().map(Path::toString).collect(Collectors.joining(File.pathSeparator));
}

private void combineResults(final Set<ClassResult> classResults) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void setUp() throws MalformedURLException {

path = Paths.get(testClassPath).toAbsolutePath();

final Set<Path> classPaths = Stream.of(System.getProperty("java.class.path").split(":"))
final Set<Path> classPaths = Stream.of(System.getProperty("java.class.path").split(File.pathSeparator))
.map(Paths::get)
.collect(Collectors.toSet());

Expand Down

0 comments on commit a80d66e

Please sign in to comment.