Reuse functionality already present and fix PMD violations an the way

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1531257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2013-10-11 11:25:28 +00:00
parent 9606080213
commit 188933345a
1 changed files with 2 additions and 2 deletions

View File

@ -457,7 +457,7 @@ public class CharUtils {
* @return true if between 65 and 90 or 97 and 122 inclusive * @return true if between 65 and 90 or 97 and 122 inclusive
*/ */
public static boolean isAsciiAlpha(final char ch) { public static boolean isAsciiAlpha(final char ch) {
return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); return isAsciiAlphaUpper(ch) || isAsciiAlphaLower(ch);
} }
/** /**
@ -533,7 +533,7 @@ public class CharUtils {
* @return true if between 48 and 57 or 65 and 90 or 97 and 122 inclusive * @return true if between 48 and 57 or 65 and 90 or 97 and 122 inclusive
*/ */
public static boolean isAsciiAlphanumeric(final char ch) { public static boolean isAsciiAlphanumeric(final char ch) {
return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9'); return isAsciiAlpha(ch) || isAsciiNumeric(ch);
} }
} }