some annotations added

This commit is contained in:
Max Medvedev
2014-12-30 00:29:56 +03:00
parent ffe0ee9ac0
commit ae568eedb5
3 changed files with 10 additions and 3 deletions
@@ -100,7 +100,7 @@ public class OSProcessHandler extends BaseOSProcessHandler {
* @param process Process
* @return True if process tree has been successfully killed.
*/
protected boolean killProcessTree(final Process process) {
protected boolean killProcessTree(@NotNull Process process) {
LOG.debug("killing process tree");
final boolean destroyed = OSProcessManager.getInstance().killProcessTree(process);
if (!destroyed) {
@@ -18,6 +18,7 @@ package com.intellij.execution.process;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
@@ -39,30 +40,35 @@ public class ProcessOutput {
myExitCode = exitCode;
}
public void appendStdout(String text) {
public void appendStdout(@Nullable String text) {
myStdoutBuilder.append(text);
}
public void appendStderr(String text) {
public void appendStderr(@Nullable String text) {
myStderrBuilder.append(text);
}
@NotNull
public String getStdout() {
return myStdoutBuilder.toString();
}
@NotNull
public String getStderr() {
return myStderrBuilder.toString();
}
@NotNull
public List<String> getStdoutLines() {
return splitLines(getStdout());
}
@NotNull
public List<String> getStderrLines() {
return splitLines(getStderr());
}
@NotNull
private static List<String> splitLines(String s) {
String converted = StringUtil.convertLineSeparators(s);
return StringUtil.split(converted, "\n");
@@ -139,6 +139,7 @@ public class PySdkUtil {
private static ProcessOutput getOutputForException(final Exception e) {
LOG.warn(e);
return new ProcessOutput() {
@NotNull
@Override
public String getStderr() {
String err = super.getStderr();