Le serveur gitlab sera inaccessible le mercredi 19 février 2020 de 13h à 14h pour une intervention de maintenance programmée.

Commit 143f4631 authored by Dominique Marcadet's avatar Dominique Marcadet

avoid NPE when referred object is in ServiceNS

parent a4db5367
......@@ -3589,11 +3589,17 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
}
else {
setRefersToFunctionalConstraint( foundFC );
String foundWhere = "(???";
if( getRefersToFunctionalConstraint().getParentFunctionalConstraints().getParentNS() != null ) {
foundWhere = "NS (id:" + getRefersToFunctionalConstraint().getParentFunctionalConstraints().getParentNS().getId();
}
else if( getRefersToFunctionalConstraint().getParentFunctionalConstraints().getParentServiceNS() != null ) {
foundWhere = "ServiceNS (id:" + getRefersToFunctionalConstraint().getParentFunctionalConstraints().getParentServiceNS().getId();
}
console.info( "[NSD links] FunctionalConstraint (abbreviation: " + getFc()
+ ") refers by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToFunctionalConstraint().getParentFunctionalConstraints().getParentNS().getId()
+ ")" );
+ getName() + ") in NS (id:" + ns.getId() + ") found in "
+ foundWhere + ")" );
}
}
......@@ -3605,10 +3611,17 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
}
else {
setRefersToPresenceCondition( foundPC );
String foundWhere = "(???";
if( getRefersToPresenceCondition().getParentPresenceConditions().getParentNS() != null ) {
foundWhere = "NS (id:" + getRefersToPresenceCondition().getParentPresenceConditions().getParentNS().getId();
}
else if( getRefersToPresenceCondition().getParentPresenceConditions().getParentServiceNS() != null ) {
foundWhere = "ServiceNS (id:" + getRefersToPresenceCondition().getParentPresenceConditions().getParentServiceNS().getId();
}
console.info( "[NSD links] PresenceCondition (name: " + getPresCond()
+ ") refers by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToPresenceCondition().getParentPresenceConditions().getParentNS().getId() + ")" );
+ foundWhere + ")" );
}
}
......@@ -3673,12 +3686,17 @@ public class DataAttributeImpl extends DocumentedClassImpl implements DataAttrib
}
else {
setRefersToConstructedAttribute( foundCA );
String foundWhere = "(???";
if( getRefersToConstructedAttribute().getParentConstructedAttributes() != null ) {
foundWhere = "NS (id:" + getRefersToConstructedAttribute().getParentConstructedAttributes().getParentNS().getId();
}
else if( getRefersToConstructedAttribute().getParentServiceTypeRealizations() != null ) {
foundWhere = "ServiceNS (id:" + getRefersToConstructedAttribute().getParentServiceTypeRealizations().getParentServiceNS().getId();
}
console.info( "[NSD links] ConstructedAttribute (name: " + getType()
+ ") refers as type by DataAttribute (name: "
+ getName() + ") in NS (id:" + ns.getId() + ") found in NS (id:"
+ getRefersToConstructedAttribute().getParentConstructedAttributes().getParentNS()
.getId()
+ ")" );
+ foundWhere + ")" );
}
break;
case DefinedAttributeTypeKind.ENUMERATED_VALUE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment