fredrik     2003/11/04 12:26:15

  Modified:    lang/src/java/org/apache/commons/lang/math NumberUtils.java
  Log:
  Using StringUtils.isEmpty() when testing Strings.
  
  Revision  Changes    Path
  1.17      +3 -3      
jakarta-commons/lang/src/java/org/apache/commons/lang/math/NumberUtils.java
  
  Index: NumberUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/NumberUtils.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- NumberUtils.java  23 Sep 2003 17:02:10 -0000      1.16
  +++ NumberUtils.java  4 Nov 2003 20:26:14 -0000       1.17
  @@ -1314,7 +1314,7 @@
        * @return <code>true</code> if str contains only unicode numeric
        */
       public static boolean isDigits(String str) {
  -        if ((str == null) || (str.length() == 0)) {
  +        if (StringUtils.isEmpty(str)) {
               return false;
           }
           for (int i = 0; i < str.length(); i++) {
  @@ -1339,7 +1339,7 @@
        * @return <code>true</code> if the string is a correctly formatted number
        */
       public static boolean isNumber(String str) {
  -        if ((str == null) || (str.length() == 0)) {
  +        if (StringUtils.isEmpty(str)) {
               return false;
           }
           char[] chars = str.toCharArray();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to