commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Heuer <heue...@acm.org>
Subject [lang] Re: cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang Validate.java
Date Tue, 01 Jun 2004 22:09:54 GMT

On 1 Jun 2004 scolebourne@apache.org wrote:

> 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

I'm confused -- why shouldn't a class in [lang] have dependencies to
other classes in [lang]?  Isn't this taking things too far??

   michael


>   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
>
>


---------------------------------------------------------------------
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