mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
@NotNull'ed for EA-56831 - NPE: RemoteProcessSupport.release
This commit is contained in:
@@ -151,9 +151,9 @@ public abstract class RemoteProcessSupport<Target, EntryPoint, Parameters> {
|
||||
public void release(@NotNull Target target, @Nullable Parameters configuration) {
|
||||
ArrayList<ProcessHandler> handlers = new ArrayList<ProcessHandler>();
|
||||
synchronized (myProcMap) {
|
||||
for (Pair<Target, Parameters> pair : myProcMap.keySet()) {
|
||||
if (pair.first == target && (configuration == null || pair.second == configuration)) {
|
||||
ContainerUtil.addIfNotNull(myProcMap.get(pair).handler, handlers);
|
||||
for (Pair<Target, Parameters> key : myProcMap.keySet()) {
|
||||
if (key.first == target && (configuration == null || key.second == configuration)) {
|
||||
ContainerUtil.addIfNotNull(myProcMap.get(key).handler, handlers);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public abstract class RemoteProcessSupport<Target, EntryPoint, Parameters> {
|
||||
fireModificationCountChanged();
|
||||
}
|
||||
|
||||
private void startProcess(Target target, Parameters configuration, Pair<Target, Parameters> key) {
|
||||
private void startProcess(Target target, Parameters configuration, @NotNull Pair<Target, Parameters> key) {
|
||||
ProgramRunner runner = new DefaultProgramRunner() {
|
||||
@Override
|
||||
@NotNull
|
||||
@@ -196,7 +196,7 @@ public abstract class RemoteProcessSupport<Target, EntryPoint, Parameters> {
|
||||
protected abstract RunProfileState getRunProfileState(Target target, Parameters configuration, Executor executor)
|
||||
throws ExecutionException;
|
||||
|
||||
private boolean getExistingInfo(Ref<RunningInfo> ref, Pair<Target, Parameters> key) {
|
||||
private boolean getExistingInfo(@NotNull Ref<RunningInfo> ref, @NotNull Pair<Target, Parameters> key) {
|
||||
Info info;
|
||||
synchronized (myProcMap) {
|
||||
info = myProcMap.get(key);
|
||||
@@ -254,7 +254,7 @@ public abstract class RemoteProcessSupport<Target, EntryPoint, Parameters> {
|
||||
return (T)(to.isInstance(remote) ? remote : PortableRemoteObject.narrow(remote, to));
|
||||
}
|
||||
|
||||
private ProcessListener getProcessListener(final Pair<Target, Parameters> key) {
|
||||
private ProcessListener getProcessListener(@NotNull final Pair<Target, Parameters> key) {
|
||||
return new ProcessListener() {
|
||||
@Override
|
||||
public void startNotified(ProcessEvent event) {
|
||||
|
||||
Reference in New Issue
Block a user