in src/main/java/org/apache/commons/validator/FormSetFactory.java [66:95]
private FormSet createFormSet(final ValidatorResources resources,
final String language,
final String country,
final String variant) {
// Retrieve existing FormSet for the language/country/variant
FormSet formSet = resources.getFormSet(language, country, variant);
if (formSet != null) {
if (getLog().isDebugEnabled()) {
getLog().debug("FormSet[" + formSet.displayKey() + "] found - merging.");
}
return formSet;
}
// Create a new FormSet for the language/country/variant
formSet = new FormSet();
formSet.setLanguage(language);
formSet.setCountry(country);
formSet.setVariant(variant);
// Add the FormSet to the validator resources
resources.addFormSet(formSet);
if (getLog().isDebugEnabled()) {
getLog().debug("FormSet[" + formSet.displayKey() + "] created.");
}
return formSet;
}