private static final Key<Boolean> MEDIATOR_KEY = Key.create("KillableColoredProcessHandler.Mediator.Process");
private boolean myShouldKillProcessSoftly = true;
- private boolean myMediatedProcess = false;
+ private final boolean myMediatedProcess;
public KillableColoredProcessHandler(@NotNull GeneralCommandLine commandLine) throws ExecutionException {
- super(commandLine);
+ this(commandLine, false);
}
/**
*/
public KillableColoredProcessHandler(@NotNull Process process, /*@NotNull*/ String commandLine) {
super(process, commandLine);
+ myMediatedProcess = false;
}
/**
*/
public KillableColoredProcessHandler(@NotNull Process process, /*@NotNull*/ String commandLine, @NotNull Charset charset) {
super(process, commandLine, charset);
+ myMediatedProcess = false;
}
- private static GeneralCommandLine mediate(GeneralCommandLine commandLine, boolean withMediator) {
+ @NotNull
+ private static GeneralCommandLine mediate(@NotNull GeneralCommandLine commandLine, boolean withMediator) {
if (withMediator && SystemInfo.isWindows) {
boolean mediatorInjected = RunnerMediator.injectRunnerCommand(commandLine);
MEDIATOR_KEY.set(commandLine, mediatorInjected);