Fix NPE when count() AttributeFunction is used
@@ -282,11 +282,13 @@ public class ExpressionBuilder {
((AttributeFunction) expression).getNamespace(),
((AttributeFunction) expression).getName());
Expression[] expressions = ((AttributeFunction) expression).getParameters();
+ if (expressions != null) {
for (int i = 0; i < expressions.length; i++) {
expressionVisitor.beginVisitParameterAttributeFunction(i);
buildVariableExecutors(expressions[i], expressionVisitor);
expressionVisitor.endVisitParameterAttributeFunction(i);
}
+ }
expressionVisitor.endVisitAttributeFunction(
((AttributeFunction) expression).getNamespace(),
((AttributeFunction) expression).getName());
