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

Bug 322276

Summary: NPE raised when specifying positionInList in menus
Product: [Eclipse Project] e4 Reporter: Brian de Alwis <bsd>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch reversing the comparisons to prevent possible NPEs none

Description Brian de Alwis CLA 2010-08-10 15:26:42 EDT
Created attachment 176268 [details]
patch reversing the comparisons to prevent possible NPEs

BuildId: I20100806

Using a model fragment to insert a menu item that specifies a positionInList may lead to an NPE. This occurs if the traversal encounters a menu item with no elementId.  

Since we're doing string comparisons, and the identifier being sought is definitely not null, we can simply swap the comparison.
Comment 1 Brian de Alwis CLA 2010-08-10 15:28:20 EDT
Fix committed to HEAD
Comment 2 Brian de Alwis CLA 2010-08-10 15:29:28 EDT
Forgot to update the status.  Sorry for the noise.