commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1531257 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/CharUtils.java
Date Fri, 11 Oct 2013 11:25:29 GMT
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);
     }
     
 }



Mime
View raw message