You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2013/10/11 13:25:29 UTC

svn commit: r1531257 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharUtils.java

Author: britter
Date: Fri Oct 11 11:25:28 2013
New Revision: 1531257

URL: http://svn.apache.org/r1531257
Log:
Reuse functionality already present and fix PMD violations an the way

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharUtils.java?rev=1531257&r1=1531256&r2=1531257&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharUtils.java Fri Oct 11 11:25:28 2013
@@ -457,7 +457,7 @@ public class CharUtils {
      * @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 @@ public class CharUtils {
      * @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);
     }
     
 }