introducing launchOptions local var

pull/443/head
Rui Gu 9 years ago
parent c40168ed89
commit dddad4d4d7

2
.gitignore vendored

@ -8,3 +8,5 @@
/target /target
/*.cmd /*.cmd
nb-configuration.xml

@ -193,13 +193,11 @@ public class RedisRunner {
} }
private static RedisProcess runWithOptions(String... options) throws IOException, InterruptedException { private static RedisProcess runWithOptions(String... options) throws IOException, InterruptedException {
System.out.println("REDIS LAUNCH OPTIONS: " + Arrays.toString(Arrays.stream(options) String[] launchOptions = Arrays.stream(options)
.collect(Collectors.joining()) .collect(Collectors.joining())
.split(" "))); .split(" ");
ProcessBuilder master = new ProcessBuilder( System.out.println("REDIS LAUNCH OPTIONS: " + Arrays.toString(launchOptions));
Arrays.stream(options) ProcessBuilder master = new ProcessBuilder(launchOptions)
.collect(Collectors.joining())
.split(" "))
.redirectErrorStream(true) .redirectErrorStream(true)
.directory(new File(redisBinary).getParentFile()); .directory(new File(redisBinary).getParentFile());
Process p = master.start(); Process p = master.start();

Loading…
Cancel
Save