mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-108207 Rerun process in Run tool window throws NPE
This commit is contained in:
@@ -30,7 +30,7 @@ public abstract class RunnerRegistry implements ApplicationComponent {
|
||||
public abstract boolean hasRunner(@NotNull final String executorId, @NotNull final RunProfile settings);
|
||||
|
||||
@Nullable
|
||||
public abstract ProgramRunner getRunner(final String executorId, final RunProfile settings);
|
||||
public abstract ProgramRunner getRunner(@NotNull final String executorId, final RunProfile settings);
|
||||
|
||||
public abstract ProgramRunner[] getRegisteredRunners();
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ public class ProgramRunnerUtil {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static ProgramRunner getRunner(final String executorId, final RunnerAndConfigurationSettings configuration) {
|
||||
return RunnerRegistry.getInstance().getRunner(executorId, configuration.getConfiguration());
|
||||
public static ProgramRunner getRunner(@NotNull final String executorId, final RunnerAndConfigurationSettings configuration) {
|
||||
return configuration == null ? null : RunnerRegistry.getInstance().getRunner(executorId, configuration.getConfiguration());
|
||||
}
|
||||
|
||||
public static void executeConfiguration(@NotNull final Project project,
|
||||
|
||||
@@ -51,7 +51,8 @@ public class RunnerRegistryImpl extends RunnerRegistry {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProgramRunner getRunner(final String executorId, final RunProfile settings) {
|
||||
public ProgramRunner getRunner(@NotNull final String executorId, final RunProfile settings) {
|
||||
if (settings == null) return null;
|
||||
final ProgramRunner[] runners = getRegisteredRunners();
|
||||
for (final ProgramRunner runner : runners) {
|
||||
if (runner.canRun(executorId, settings)) {
|
||||
|
||||
Reference in New Issue
Block a user