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

Bug 309034

Summary: [design] NPE in Business Theme using Standalone Views
Product: [RT] RAP Reporter: Steve Robenalt <steve>
Component: DemoAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.2   
Target Milestone: 1.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Steve Robenalt CLA 2010-04-13 15:09:57 EDT
The problem occurs when using a theme derived from the "Business" theme applied to a RAP application that uses standalone views.

When trying to hide a view, the ViewStackPresentation.removePart() method tries to remove the button associated with the ViewPart, but there is no button available. As such, the following line:

    ( ( Composite ) object ).dispose(); 

throws the NPE since object is null. As a side effect, the view that was supposed to be removed never goes away since the remainder of the method is skipped.

I put a null pointer check on the above line prior to execution and solved the immediate problem, but the method could probably use a bit of refactoring to make the cause of the condition a bit clearer.
Comment 1 Holger Staudacher CLA 2010-04-19 04:44:19 EDT
Fixed and committed to CVS HEAD.