[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ptp-dev] Possible NullPointException in RemoteLaunchProcess
|
In RemoteLaunchProcess from Remote Tools plugin, I noticed codes as following:
protected void runApplication() throws CoreException, CancelException {
if (! launchIntegration.getDoLaunchApplication()) {
launchProcessOutputWriter.println("* Launch configuration does not require running the executable.");
return;
}
......
RemoteProcess remoteProcess = null;
executionResult = new ExecutionResult(); <-- executionResult is Null if launchIntegration.getDoLaunchApplication() return false
......
After returning from runApplication(), it goes to:
try {
......
runApplication(); <-- return directly if launchIntegration.getDoLaunchApplication() is false
......
if (executionResult.getStatus() == ExecutionResult.SUCCESS) { <-- NPE is thrown here
showProcessConsole();
} else {
showLaunchConsole();
}
Because the getDoLaunchApplication() method in launchIntegration can be overrided as returning false, so a NPE will be thrown without checking if the executionResult is Null. How about add a simple check here?
Daniel, could you have a look at this?
Best Regards,
------
Hongchang Lin
System Performance Tools
IBM China Systems & Technology Laboratory in Shanghai
Email:linhongc@xxxxxxxxxx
Tel:86-21-6092-2424 (T/L: 11902-2424)