mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Made commandLine not-null in OSProcessHandler, BaseOSProcessHandler, BaseDataReader.start() and the like.
This commit is contained in:
@@ -1203,9 +1203,7 @@ public class BuildManager implements Disposable {
|
||||
LOG.error(e);
|
||||
}
|
||||
|
||||
final Process process = cmdLine.createProcess();
|
||||
|
||||
final OSProcessHandler processHandler = new OSProcessHandler(process, null, mySystemCharset, BuildMain.class.getName()+" external process") {
|
||||
final OSProcessHandler processHandler = new OSProcessHandler(cmdLine) {
|
||||
@Override
|
||||
protected boolean shouldDestroyProcessRecursively() {
|
||||
return true;
|
||||
|
||||
+1
-2
@@ -20,7 +20,6 @@ import com.intellij.execution.configurations.CommandLineBuilder;
|
||||
import com.intellij.execution.configurations.GeneralCommandLine;
|
||||
import com.intellij.execution.configurations.JavaParameters;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@@ -35,7 +34,7 @@ public class DefaultJavaProcessHandler extends OSProcessHandler {
|
||||
super(commandLine);
|
||||
}
|
||||
|
||||
public DefaultJavaProcessHandler(@NotNull Process process, @Nullable String commandLine, @NotNull Charset charset) {
|
||||
public DefaultJavaProcessHandler(@NotNull Process process, @NotNull String commandLine, @NotNull Charset charset) {
|
||||
super(process, commandLine, charset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.intellij.openapi.application.Result;
|
||||
import com.intellij.openapi.application.WriteAction;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.compiler.*;
|
||||
import com.intellij.openapi.fileEditor.impl.LoadTextUtil;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.projectRoots.impl.JavaAwareProjectJdkTableImpl;
|
||||
@@ -28,6 +29,7 @@ import com.intellij.openapi.roots.CompilerModuleExtension;
|
||||
import com.intellij.openapi.roots.CompilerProjectExtension;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.roots.ModuleRootModificationUtil;
|
||||
import com.intellij.openapi.util.ThrowableComputable;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -209,10 +211,18 @@ public class CompilerTester {
|
||||
public void run() throws Throwable {
|
||||
PlatformTestUtil.saveProject(getProject());
|
||||
CompilerTestUtil.saveApplicationSettings();
|
||||
for (Module module : myModules) {
|
||||
for (final Module module : myModules) {
|
||||
File ioFile = new File(module.getModuleFilePath());
|
||||
if (!ioFile.exists()) {
|
||||
getProject().save();
|
||||
WriteCommandAction.runWriteCommandAction(getProject(), new ThrowableComputable() {
|
||||
@Override
|
||||
public Object compute() throws Throwable {
|
||||
String text = LoadTextUtil.loadText(module.getModuleFile()).toString();
|
||||
VfsUtil.saveText(module.getModuleFile(), text);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
assert ioFile.exists() : "File does not exist: " + ioFile.getPath();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user