Bug 522731

Summary: NPE when selecting mappings in VSM if a member of a hierarchy has a null id or name
Product: [Modeling] Sirius Reporter: Pierre Guilet <pierre.guilet>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: NEW --- QA Contact:
Severity: minor    
Priority: P3 CC: florian.barbin, maxime.porhel
Version: 5.1.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard: trivial
Attachments:
Description Flags
file to reproduce none

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.