commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang Validate.java
Date Tue, 01 Jun 2004 21:25:35 GMT
scolebourne    2004/06/01 14:25:35

  Modified:    lang/src/java/org/apache/commons/lang Validate.java
  Log:
  Ensure Validate has no inter-lang dependencies
  
  Revision  Changes    Path
  1.12      +6 -5      jakarta-commons/lang/src/java/org/apache/commons/lang/Validate.java
  
  Index: Validate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/Validate.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Validate.java	19 Feb 2004 21:04:03 -0000	1.11
  +++ Validate.java	1 Jun 2004 21:25:35 -0000	1.12
  @@ -38,6 +38,7 @@
    * @version $Id$
    */
   public class Validate {
  +    // Validate has no dependencies on other classes in Commons Lang at present
       
       /**
        * Constructor. This class should not normally be instantiated.
  @@ -236,7 +237,7 @@
        * @throws IllegalArgumentException if the array is empty
        */
       public static void notEmpty(Object[] array, String message) {
  -        if (ArrayUtils.isEmpty(array)) {
  +        if (array == null || array.length == 0) {
               throw new IllegalArgumentException(message);
           }
       }
  @@ -255,7 +256,7 @@
        * @throws IllegalArgumentException if the array is empty
        */
       public static void notEmpty(Object[] array) {
  -        if (ArrayUtils.isEmpty(array)) {
  +        if (array == null || array.length == 0) {
               throw new IllegalArgumentException("The validated array is empty");
           }
       }
  @@ -356,7 +357,7 @@
        * @throws IllegalArgumentException if the string is empty
        */
       public static void notEmpty(String string, String message) {
  -        if (StringUtils.isEmpty(string)) {
  +        if (string == null || string.length() == 0) {
               throw new IllegalArgumentException(message);
           }
       }
  @@ -375,7 +376,7 @@
        * @throws IllegalArgumentException if the string is empty
        */
       public static void notEmpty(String string) {
  -        if (StringUtils.isEmpty(string)) {
  +        if (string == null || string.length() == 0) {
               throw new IllegalArgumentException("The validated string is empty");
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message