in core/src/main/java/org/apache/jsieve/SieveValidationVisitor.java [173:194]
private void requirements(ASTstring node) throws SieveException {
final Object value = node.getValue();
if (value != null && value instanceof String) {
final String name = (String) value;
if (name.startsWith(COMPARATOR_PREFIX)) {
final String comparatorName = name.substring(COMPARATOR_PREFIX_LENGTH);
if (comparatorManager.isSupported(comparatorName)) {
declaredComparators.add(comparatorName);
} else {
// TODO: Replace with more finely grained exception
throw new SieveException("Comparator " + comparatorName + " is not supported");
}
} else {
try {
commandManager.getCommand(name);
} catch (LookupException e) {
// TODO: catching is inefficient, should just check
testManager.getTest(name);
}
}
}
}