Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322276 - NPE raised when specifying positionInList in menus
Summary: NPE raised when specifying positionInList in menus
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-10 15:26 EDT by Brian de Alwis CLA
Modified: 2010-08-10 15:29 EDT (History)
0 users

See Also:


Attachments
patch reversing the comparisons to prevent possible NPEs (994 bytes, application/octet-stream)
2010-08-10 15:26 EDT, Brian de Alwis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.