ModelDriven / Alf-Reference-Implementation

Open-source implementation of the Action Language for fUML (Alf) specification.
30 stars 2 forks source link

EqualityExpressionMapping.mapOperator should check for null operand results #72

Closed seidewitz closed 5 years ago

seidewitz commented 5 years ago

The mapOperator method has operand1Result and operand2Result arguments. In BinaryExpressionMapping, this method checks if these arguments are null, and throws a MappingError if either one is. The method is overridden in EqualityExpressionMapping, without ever calling the superclass method. However, EqualityExpressionMapping.mapOperator does not check whether the operand result arguments are null. If one is, due to an ill-formed model, this ultimately causes a NullPointerException rather than a more controlled MappingError. The method in EqualityExpressionMapping should, instead, check for null arguments, as the superclass method does.

seidewitz commented 5 years ago

Resolved in v1.1.0g.