Bug 446095 - CCE in TrimStack if PerspectiveStack and Perspective uses the same ID
Summary: CCE in TrimStack if PerspectiveStack and Perspective uses the same ID
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.5 M6   Edit
Assignee: Dirk Fauth CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatfix
Depends on:
Blocks:
 
Reported: 2014-10-06 18:02 EDT by Lars Vogel CLA
Modified: 2015-04-05 21:31 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2014-10-06 18:02:12 EDT
IIRC from todays Eclipse RCP training the offending line was:

802 MPerspective persp = (MPerspective) modelService.find(perspId, ps.get(0));

I suggest to use a type safe search method of the modelService. Simon, can you prepare a fix for this?
Comment 1 Thomas Schindl CLA 2014-10-06 18:46:25 EDT
Why does typesafe search safe you from an NPE? Looking at the code you posted should we query in ps (which i assume is MPerspectiveStack) for a perspectiveId searching in the first perspective for a perspective looks odd to me, not?
Comment 2 Lars Vogel CLA 2014-10-06 19:23:22 EDT
(In reply to Thomas Schindl from comment #1)
> Why does typesafe search safe you from an NPE? Looking at the code you
> posted should we query in ps (which i assume is MPerspectiveStack) for a
> perspectiveId searching in the first perspective for a perspective looks odd
> to me, not?

Sorry was a CCE. Maybe the position was incorrect, I wrote this bug from memory so that is is not forgotten. To see where this happens create a RCP app with perspective stack and perspective using the same ID and minimize one of your parts.
Comment 3 Eclipse Genie CLA 2015-02-06 17:28:38 EST
New Gerrit change created: https://git.eclipse.org/r/41339
Comment 5 Lars Vogel CLA 2015-02-13 06:35:22 EST
Thanks Dirk.