Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342208

Summary: potential NPE in SystemView$ExpandRemoteObjects.execute()
Product: [Tools] Target Management Reporter: David McKnight <dmcknigh>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 342560    
Attachments:
Description Flags
patch to check for null callback none

Description David McKnight CLA 2011-04-07 14:44:08 EDT
In  SystemView$ExpandRemoteObjects.execute() we have the following code:

if (item != null && !item.isDisposed()) {
    IRSECallback callback = getCallbackForSubChildren(itemToExpand, _toExpand);
    createChildren(item, callback);
    ((TreeItem) item).setExpanded(true);
}

The problem is that getCallbackForSubChildren() can return null and we're not checking for that case.
Comment 1 David McKnight CLA 2011-04-07 15:10:21 EDT
Created attachment 192773 [details]
patch to check for null callback
Comment 2 David McKnight CLA 2011-04-07 15:14:28 EDT
I've committed the fix to cvs.