Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdt-papyrus.dev] NPE in SysML 1.1

Hi everyone,

 

There is a nasty NPE in SysML 1.1

It’s coming from the change of VISUAL_ID from int to String.

 

In short

UMLVisualIDRegistry.getVisualID(view) can return null

and

switch (UMLVisualIDRegistry.getVisualID(view)) { will throw an NPE

 

I believe it’s coming from the following lines in VisualIDRegistry template

       override def unrecognizedVID(GenDiagram it) '''

       return null;

       '''

 

ð  Is there an objection to return an empty String (or an “UNKNOWN” String) ?

 

The other solution may be to handle all place in the code where NPE can occur.

 

Regards,

Benoit

1 : https://bugs.eclipse.org/bugs/show_bug.cgi?id=497678

 


Back to the top