private void comparatorNameArgument()

in core/src/main/java/org/apache/jsieve/SieveValidationVisitor.java [159:171]


    private void comparatorNameArgument(ASTstring node) throws SieveException {
        final Object value = node.getValue();
        if (value != null && value instanceof String) {
            final String name = (String) value;
            // Comparators must either be declared (either implicitly or explicitly)
            if (!comparatorManager.isImplicitlyDeclared(name)) {
                if (!declaredComparators.contains(name)) {
                    // TODO: replace with better exception
                    throw new SieveException("Comparator must be explicitly declared in a require statement.");
                }
            }
        }
    }