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

Bug 314961

Summary: NPE protection in DiagramIOUtil
Product: [Modeling] GMF-Runtime Reporter: Lidija Grahek <lgrahek>
Component: GeneralAssignee: Lidija Grahek <lgrahek>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aboyko, ahunter.eclipse
Version: 2.3   
Target Milestone: 2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Lidija Grahek CLA 2010-05-28 17:57:32 EDT
Created attachment 170435 [details]
Patch

DiagramIOUtil.unload(...) calls diagram.eResource().unload(). However, in my case resource is already unloaded, so this call results in an NPE. Attached patch just adds a simple NPE protection.
Comment 1 Alex Boyko CLA 2010-05-31 00:19:21 EDT
looks good to me
Comment 2 Anthony Hunter CLA 2010-05-31 11:08:59 EDT
look good as well.
Comment 3 Lidija Grahek CLA 2010-05-31 11:29:42 EDT
Committed to head.
Comment 4 Eclipse Webmaster CLA 2010-07-16 23:38:13 EDT
[target cleanup] 2.3 RC was the original target milestone for this
bug
Comment 5 Eclipse Webmaster CLA 2010-07-19 21:57:55 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug