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
diff --git a/src/main/java/org/apache/commons/lang3/CharUtils.java b/src/main/java/org/apache/commons/lang3/CharUtils.java
index d603cfa..f8f284e 100644
--- a/src/main/java/org/apache/commons/lang3/CharUtils.java
+++ b/src/main/java/org/apache/commons/lang3/CharUtils.java
@@ -457,7 +457,7 @@
* @return true if between 65 and 90 or 97 and 122 inclusive
*/
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 @@
* @return true if between 48 and 57 or 65 and 90 or 97 and 122 inclusive
*/
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);
}
}