boolean (Pair<Target, Parameters> key, @Nullable Throwable error, @Nullable ProcessHandler handler) { Info info; synchronized (myProcMap) { info = myProcMap.get(key); if (info != null && (handler == null || info.handler == handler)) { myProcMap.remove(key); myProcMap.notifyAll(); } else { // different processHandler info = null; } } if (info instanceof PendingInfo pendingInfo) { if (error != null || pendingInfo.stderr.length() > 0 || pendingInfo.ref.isNull()) { pendingInfo.ref.set(new FailedInfo(error, pendingInfo.stderr.toString())); } synchronized (pendingInfo.ref) { pendingInfo.ref.notifyAll(); } } return info != null; }