public void addFormSet()

in src/main/java/org/apache/commons/validator/ValidatorResources.java [254:274]


    public void addFormSet(final FormSet fs) {
        final String key = buildKey(fs);
        if (key.isEmpty()) { // there can only be one default formset
            if (getLog().isWarnEnabled() && defaultFormSet != null) {
                // warn the user he might not get the expected results
                getLog().warn("Overriding default FormSet definition.");
            }
            defaultFormSet = fs;
        } else {
            final FormSet formset = getFormSets().get(key);
            if (formset == null) { // it hasn't been included yet
                if (getLog().isDebugEnabled()) {
                    getLog().debug("Adding FormSet '" + fs + "'.");
                }
            } else if (getLog().isWarnEnabled()) { // warn the user he might not
                                                   // get the expected results
                getLog().warn("Overriding FormSet definition. Duplicate for locale: " + key);
            }
            getFormSets().put(key, fs);
        }
    }