| Summary: | [design] NPE in Business Theme using Standalone Views | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Steve Robenalt <steve> |
| Component: | Demo | Assignee: | 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: | |||
Fixed and committed to CVS HEAD. |
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.