Statement unnecessarily nested within else clause.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1489693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c6ad3493e8
commit
d77fe491fd
|
@ -116,7 +116,7 @@ public class LocaleUtils {
|
||||||
throw new IllegalArgumentException("Invalid locale format: " + str);
|
throw new IllegalArgumentException("Invalid locale format: " + str);
|
||||||
}
|
}
|
||||||
return new Locale("", str.substring(1, 3), str.substring(4));
|
return new Locale("", str.substring(1, 3), str.substring(4));
|
||||||
} else {
|
}
|
||||||
final char ch1 = str.charAt(1);
|
final char ch1 = str.charAt(1);
|
||||||
if (!Character.isLowerCase(ch0) || !Character.isLowerCase(ch1)) {
|
if (!Character.isLowerCase(ch0) || !Character.isLowerCase(ch1)) {
|
||||||
throw new IllegalArgumentException("Invalid locale format: " + str);
|
throw new IllegalArgumentException("Invalid locale format: " + str);
|
||||||
|
@ -149,7 +149,6 @@ public class LocaleUtils {
|
||||||
}
|
}
|
||||||
return new Locale(str.substring(0, 2), str.substring(3, 5), str.substring(6));
|
return new Locale(str.substring(0, 2), str.substring(3, 5), str.substring(6));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue