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

Bug 364887

Summary: Crash in IDPresentationService with ReqIF from 3rd party
Product: [Modeling] MDT.RMF Reporter: Andreas Graf <graf>
Component: ProRAssignee: Michael Jastram <michael>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: eclipse, michael
Version: unspecified   
Target Milestone: m12.01   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andreas Graf CLA 2011-11-26 06:21:11 EST
When opening a ReqIF that was not created with ProR, the GUI crashes.

The problem is in:
	private ProrPresentationConfigurations getPresentationConfigurations(ReqIf rif) {
		ProrToolExtension uiExtension = ConfigurationUtil.getProrToolExtension(rif);
		ProrPresentationConfigurations configs = uiExtension
				.getPresentationConfigurations();
		return configs;
	}

The method is not handling a null value for uiExtension. A fix that works for me is:

// Fix by AG
	//
	private ProrPresentationConfigurations getPresentationConfigurations(ReqIf rif) {
		ProrPresentationConfigurations configs = null;
		ProrToolExtension uiExtension = ConfigurationUtil.getProrToolExtension(rif);
		if(uiExtension!= null)
		{
			configs = uiExtension
					.getPresentationConfigurations();
		}
		return configs;
	}

Returning null does not seem to be a problem, because the calling method handles null gracefully.

Any comments? Otherwise I would submit the fix.
Comment 1 Michael Jastram CLA 2011-12-21 08:12:47 EST
This can be reproduced with the Prostep test files
Comment 2 Michael Jastram CLA 2012-01-05 06:06:22 EST
Did more lazy creation of required ProR elements.
Comment 3 Michael Jastram CLA 2012-01-05 06:07:36 EST
*** Bug 366152 has been marked as a duplicate of this bug. ***
Comment 4 Michael Jastram CLA 2012-01-06 10:25:05 EST
Closed