Bug 522731 - NPE when selecting mappings in VSM if a member of a hierarchy has a null id or name
Summary: NPE when selecting mappings in VSM if a member of a hierarchy has a null id o...
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 5.1.0   Edit
Hardware: PC Windows NT
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard: trivial
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-09-25 09:18 EDT by Pierre Guilet CLA
Modified: 2017-10-18 04:30 EDT (History)
2 users (show)

See Also:


Attachments
file to reproduce (2.40 KB, application/octet-stream)
2017-10-18 04:16 EDT, Pierre Guilet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Guilet CLA 2017-09-25 09:18:44 EDT
A NPE occurs in org.eclipse.sirius.ui.business.api.dialect.HierarchyLabelProvider.getText(Object)l62

when selecting mappings

when a member of the VSM hierarchy has a null id or name.

Steps to reproduce:

1-create a new odesign create a group/viewpoint/diagram/layer/container without settings ids. 
2-Select the container and go to Import in the properties view.
3-Click on the button to select a Reused Node Mapping.

The NPE occurs in error log.
Comment 1 Florian Barbin CLA 2017-09-28 09:39:46 EDT
Hi Pierre,

I do not reproduce this issue according to the step to reproduce. Could you provide the VSM you used for reproducing this issue ?
Comment 2 Pierre Guilet CLA 2017-10-18 04:16:22 EDT
Created attachment 271050 [details]
file to reproduce
Comment 3 Pierre Guilet CLA 2017-10-18 04:17:29 EDT
(In reply to Pierre Guilet from comment #0)
> A NPE occurs in
> org.eclipse.sirius.ui.business.api.dialect.HierarchyLabelProvider.
> getText(Object)l62
> 
> when selecting mappings
> 
> when a member of the VSM hierarchy has a null id or name.
> 
> Steps to reproduce:
> 
> 1-create a new odesign create a group/viewpoint/diagram/layer/container
> without settings ids. 
> 2-Select the container and go to Import in the properties view.
> 3-Click on the button to select a Reused Node Mapping.
> 
> The NPE occurs in error log.

The problem occurs when root layer has empty ID.
Comment 4 Maxime Porhel CLA 2017-10-18 04:30:10 EDT
Thanks for the model and comment, Pierre. 

I triaged this as minor as the default layer is initialized with a default id.