case NE:
logger.warn("Use of NULL values in SeRQL queries has been deprecated, use BOUND(...) instead");
compareNode.jjtReplaceWith(new ASTBooleanConstant(false));
break;
default:
throw new VisitorException(
"Use of NULL values in SeRQL queries has been deprecated, use BOUND(...) instead");
}
}
else if (leftIsNull || rightIsNull) {
ASTValueExpr valueOperand;
if (leftIsNull) {
valueOperand = compareNode.getRightOperand();
}
else {
valueOperand = compareNode.getLeftOperand();
}
if (valueOperand instanceof ASTVar && operator == EQ || operator == NE) {
ASTBooleanExpr replacementNode = new ASTBound(valueOperand);
if (operator == EQ) {
replacementNode = new ASTNot(replacementNode);
}
compareNode.jjtReplaceWith(replacementNode);
return null;
}
throw new VisitorException(
"Use of NULL values in SeRQL queries has been deprecated, use BOUND(...) instead");
}
return null;
}