mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
[302478] ProcessServiceSubSystem.getRemoteProcessObject() doesn't check for null
This commit is contained in:
parent
59ad1c4786
commit
4676155046
1 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
|
* Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
* David McKnight (IBM) - [220524] internalSwitchServiceSubSystemConfiguration -> internalSwitchSubSystemConfiguration
|
* David McKnight (IBM) - [220524] internalSwitchServiceSubSystemConfiguration -> internalSwitchSubSystemConfiguration
|
||||||
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
|
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
|
||||||
* David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
|
* David McKnight (IBM) - [272882] [api] Handle exceptions in IService.initService()
|
||||||
|
* David McKnight (IBM) - [302478] ProcessServiceSubSystem.getRemoteProcessObject() doesn't check for null
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
package org.eclipse.rse.subsystems.processes.servicesubsystem;
|
||||||
|
@ -98,8 +99,13 @@ public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implemen
|
||||||
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
|
||||||
rpfs.setPid("" + pid); //$NON-NLS-1$
|
rpfs.setPid("" + pid); //$NON-NLS-1$
|
||||||
IRemoteProcessContext context = new RemoteProcessContext(this, null, rpfs);
|
IRemoteProcessContext context = new RemoteProcessContext(this, null, rpfs);
|
||||||
IHostProcess process = getProcessService().getProcess(pid, null);
|
IHostProcess process = getProcessService().getProcess(pid, new NullProgressMonitor());
|
||||||
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcess(context, null, process);
|
if (process != null){
|
||||||
|
return getHostProcessToRemoteProcessAdapter().convertToRemoteProcess(context, null, process);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue