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.
The
mapOperator
method hasoperand1Result
andoperand2Result
arguments. InBinaryExpressionMapping
, this method checks if these arguments are null, and throws aMappingError
if either one is. The method is overridden inEqualityExpressionMapping
, 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 aNullPointerException
rather than a more controlledMappingError
. The method inEqualityExpressionMapping
should, instead, check for null arguments, as the superclass method does.