| Summary: | Crash in IDPresentationService with ReqIF from 3rd party | ||
|---|---|---|---|
| Product: | [Modeling] MDT.RMF | Reporter: | Andreas Graf <graf> |
| Component: | ProR | Assignee: | 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: | |||
This can be reproduced with the Prostep test files Did more lazy creation of required ProR elements. *** Bug 366152 has been marked as a duplicate of this bug. *** Closed |
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.