Statement unnecessarily nested within else clause.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1606066 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2014-06-27 12:36:18 +00:00
parent 299ea79d66
commit f7e5f2c877
1 changed files with 1 additions and 2 deletions

View File

@ -138,9 +138,8 @@ public static Locale toLocale(final String str) {
(split[0].length() == 2 || split[0].length() == 3) &&
split[1].length() == 2 && StringUtils.isAllUpperCase(split[1])) {
return new Locale(split[0], split[1]);
} else {
throw new IllegalArgumentException("Invalid locale format: " + str);
}
throw new IllegalArgumentException("Invalid locale format: " + str);
case 2:
if (StringUtils.isAllLowerCase(split[0]) &&