in src/main/java/org/apache/commons/validator/FormSet.java [115:134]
protected int getType() {
if (getVariant() != null) {
if (getLanguage() == null || getCountry() == null) {
throw new NullPointerException(
"When variant is specified, country and language must be specified.");
}
return VARIANT_FORMSET;
}
if (getCountry() != null) {
if (getLanguage() == null) {
throw new NullPointerException(
"When country is specified, language must be specified.");
}
return COUNTRY_FORMSET;
}
if (getLanguage() != null) {
return LANGUAGE_FORMSET;
}
return GLOBAL_FORMSET;
}