Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326716 - NPE in EDC's DsfTerminateCommand handling
Summary: NPE in EDC's DsfTerminateCommand handling
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-edc (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Ken Ryall CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 17:00 EDT by John Cortell CLA
Modified: 2010-10-01 08:19 EDT (History)
0 users

See Also:
ken.ryall: review+


Attachments
fix (5.73 KB, patch)
2010-09-30 17:01 EDT, John Cortell CLA
john.cortell: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Cortell CLA 2010-09-30 17:00:31 EDT
There's a couple of issues.

1. DsfTerminateCommand.canExecute() assumes that IProcesses.canTerminate() is successful and returns a data object (a Boolean). It should assume neither. This is where the NPE happens (due to # 2)

2. Boolean properties in the EDC Run Control context should have implicit default values. Returning a null Boolean object to a requester doesn't make a lot of sense to me.
Comment 1 John Cortell CLA 2010-09-30 17:01:59 EDT
Created attachment 180001 [details]
fix
Comment 2 John Cortell CLA 2010-09-30 17:03:03 EDT
Committed to HEAD. Ken, please review.
Comment 4 Ken Ryall CLA 2010-10-01 08:19:58 EDT
+1 Nice cleanup.