Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364887 - Crash in IDPresentationService with ReqIF from 3rd party
Summary: Crash in IDPresentationService with ReqIF from 3rd party
Status: CLOSED FIXED
Alias: None
Product: MDT.RMF
Classification: Modeling
Component: ProR (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P1 critical (vote)
Target Milestone: m12.01   Edit
Assignee: Michael Jastram CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 366152 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-26 06:21 EST by Andreas Graf CLA
Modified: 2012-01-06 10:25 EST (History)
2 users (show)

See Also:


Attachments

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