Bug 264765 - DiagramViewProvider sometimes logs NPE
Summary: DiagramViewProvider sometimes logs NPE
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 minor
Target Milestone: 2.2   Edit
Assignee: Alex Boyko CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 15:03 EST by Alex Boyko CLA
Modified: 2010-07-19 12:28 EDT (History)
1 user (show)

See Also:


Attachments
patch (1.38 KB, patch)
2009-02-12 15:03 EST, Alex Boyko CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Boyko CLA 2009-02-12 15:03:45 EST
Created attachment 125574 [details]
patch

If semanticAdapter is null DiagramViewProvider throws an NPE. This doesn't affect the functionality in general, because the provider simply ignored for the operation. However, it just affects performnace - view service is slow anyway.
No need to check the eObject inside the adapter for null... adapter requires a non-null eObject.

Anthony, could you code review this please?
Comment 1 Anthony Hunter CLA 2009-02-12 16:15:47 EST
looks good.
Comment 2 Alex Boyko CLA 2009-02-27 21:21:23 EST
Fix committed for 2.2
Comment 3 Eclipse Webmaster CLA 2010-07-16 23:35:33 EDT
[target cleanup] 2.2 M6 was the original target milestone for this
bug
Comment 4 Eclipse Webmaster CLA 2010-07-19 12:28:42 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug