mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
handle "host is unresolved" error to prevent NPE in the JDK code
This commit is contained in:
@@ -45,6 +45,12 @@ abstract class RemoteVmConnection : VmConnection<Vm>() {
|
||||
|
||||
@JvmOverloads
|
||||
fun open(address: InetSocketAddress, stopCondition: Condition<Void>? = null): Promise<Vm> {
|
||||
if (address.isUnresolved) {
|
||||
val error = "Host ${address.hostString} is unresolved"
|
||||
setState(ConnectionStatus.CONNECTION_FAILED, error)
|
||||
return rejectedPromise(error)
|
||||
}
|
||||
|
||||
this.address = address
|
||||
@Suppress("DEPRECATION")
|
||||
port = address.port
|
||||
|
||||
@@ -916,8 +916,8 @@ public class XDebugSessionImpl implements XDebugSession {
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
ProcessHandler processHandler = myDebugProcess.getProcessHandler();
|
||||
if (processHandler.isProcessTerminated() || processHandler.isProcessTerminating()) return;
|
||||
ProcessHandler processHandler = myDebugProcess == null ? null : myDebugProcess.getProcessHandler();
|
||||
if (processHandler == null || processHandler.isProcessTerminated() || processHandler.isProcessTerminating()) return;
|
||||
|
||||
if (processHandler.detachIsDefault()) {
|
||||
processHandler.detachProcess();
|
||||
|
||||
Reference in New Issue
Block a user