RFR: 8164805: Fail to create a MR modular JAR with a versioned entry in base-versioned empty package
Steve Drach
steve.drach at oracle.com
Thu Oct 20 00:22:13 UTC 2016
> 76 private String files(Path start) throws IOException {
> Perhaps return Stream<String>. That can replace the unnecessary concat in a String and then later split to pass to javac.
Is this better?
private void javac(Path source, Path destination) throws IOException {
Stream<String> prefix = Stream.of("-d", destination.toString());
Stream<String> suffix = Files.isDirectory(source)
? Files.walk(source)
.map(Path::toString)
.filter(s -> s.endsWith(".java"))
: Stream.of(source.toString());
String[] args = Stream.concat(prefix, suffix).toArray(String[]::new);
JAVAC_TOOL.run(System.out, System.err, args);
}
More information about the core-libs-dev
mailing list