The setter UnitDefinition.setNamespaceName not only sets the namespace name (a QualifiedName) of a UnitDefinition, it also sets the current scope and visibility flag for that qualified name. However, it needs to first check if the name is null (which is legal for a model unit) before doing the latter, in order to avoid a null pointer exception.
The setter UnitDefinition.setNamespaceName not only sets the namespace name (a QualifiedName) of a UnitDefinition, it also sets the current scope and visibility flag for that qualified name. However, it needs to first check if the name is null (which is legal for a model unit) before doing the latter, in order to avoid a null pointer exception.