camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: svn commit: r725343 - in /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel: component/file/FileComponent.java component/file/strategy/RenameFileProcessStrategy.java util/ObjectHelper.java
Date Wed, 10 Dec 2008 19:30:03 GMT
I get build failures in camel-ftp now - do you?

/mnt/builds/camel/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java:[28,0]
cannot find symbol
symbol  : static isNotNullAndNonEmpty
location: class org.apache.camel.util.ObjectHelper

/mnt/builds/camel/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpProducer.java:[96,51]
cannot find symbol
symbol  : method isNotNullAndNonEmpty(java.lang.String)
location: class org.apache.camel.util.ObjectHelper

/mnt/builds/camel/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java:[55,12]
cannot find symbol
symbol  : method isNotNullAndNonEmpty(java.lang.String)
location: class org.apache.camel.component.file.remote.SftpEndpoint

/mnt/builds/camel/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java:[58,16]
cannot find symbol
symbol  : method isNotNullAndNonEmpty(java.lang.String)
location: class org.apache.camel.component.file.remote.SftpEndpoint

/mnt/builds/camel/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java:[66,12]
cannot find symbol
symbol  : method isNotNullAndNonEmpty(java.lang.String)
location: class org.apache.camel.component.file.remote.SftpEndpoint

/mnt/builds/camel/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpProducer.java:[95,51]
cannot find symbol
symbol  : method isNotNullAndNonEmpty(java.lang.String)
location: class org.apache.camel.util.ObjectHelper

2008/12/10  <davsclaus@apache.org>:
> Author: davsclaus
> Date: Wed Dec 10 09:09:21 2008
> New Revision: 725343
>
> URL: http://svn.apache.org/viewvc?rev=725343&view=rev
> Log:
> CAMEL-1155: Refactored ObjectHelper to use isEmpty, isNotEmpty for null and empty string
tests.
>
> Modified:
>    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
>    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
>    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
>
> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java?rev=725343&r1=725342&r2=725343&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
(original)
> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileComponent.java
Wed Dec 10 09:09:21 2008
> @@ -94,7 +94,7 @@
>         boolean ignoreCase = reminder.startsWith("ignoreCase:");
>         reminder = ignoreCase ? ifStartsWithReturnRemainder("ignoreCase:", reminder)
: reminder;
>
> -        ObjectHelper.notNull(reminder, "sortBy expression");
> +        ObjectHelper.notEmpty(reminder, "sortBy expression", this);
>
>         // recursive add nested sorters
>         return DefaultFileSorter.sortByFileLanguage(reminder, reverse, ignoreCase, createSortByComparator(it));
>
> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java?rev=725343&r1=725342&r2=725343&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
(original)
> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/RenameFileProcessStrategy.java
Wed Dec 10 09:09:21 2008
> @@ -62,7 +62,6 @@
>
>         if (beginRenamer != null) {
>             File newName = beginRenamer.renameFile(exchange, file);
> -            // deleting any existing files before renaming
>             File to = renameFile(file, newName);
>             exchange.setFile(to);
>         }
>
> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=725343&r1=725342&r2=725343&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
(original)
> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Wed Dec 10 09:09:21 2008
> @@ -157,33 +157,64 @@
>     }
>
>     /**
> -     * Asserts whether the value is <b>not</b> <tt>null</tt>
or an empty string.
> +     * Asserts whether the value is <b>not</b> <tt>null</tt>
>      *
>      * @param value  the value to test
>      * @param name   the key that resolved the value
> +     * @throws IllegalArgumentException is thrown if assertion fails
>      */
>     public static void notNull(Object value, String name) {
> -        if (isEmpty(value)) {
> +        if (value == null) {
>             throw new IllegalArgumentException(name + " must be specified");
>         }
>     }
>
>     /**
> -     * Asserts whether the value is <b>not</b> <tt>null</tt>
or an empty string.
> +     * Asserts whether the value is <b>not</b> <tt>null</tt>
>      *
>      * @param value  the value to test
>      * @param on     additional description to indicate where this problem occured (appended
as toString())
>      * @param name   the key that resolved the value
> +     * @throws IllegalArgumentException is thrown if assertion fails
>      */
>     public static void notNull(Object value, String name, Object on) {
>         if (on == null) {
>             notNull(value, name);
> -        } else if (isEmpty(value)) {
> +        } else if (value == null) {
>             throw new IllegalArgumentException(name + " must be specified on: " + on);
>         }
>     }
>
>     /**
> +     * Asserts whether the string is <b>not</b> empty.
> +     *
> +     * @param value  the string to test
> +     * @param name   the key that resolved the value
> +     * @throws IllegalArgumentException is thrown if assertion fails
> +     */
> +    public static void notEmpty(String value, String name) {
> +        if (isEmpty(value)) {
> +            throw new IllegalArgumentException(name + " must be specified and not empty");
> +        }
> +    }
> +
> +    /**
> +     * Asserts whether the string is <b>not</b> empty.
> +     *
> +     * @param value  the string to test
> +     * @param on     additional description to indicate where this problem occured (appended
as toString())
> +     * @param name   the key that resolved the value
> +     * @throws IllegalArgumentException is thrown if assertion fails
> +     */
> +    public static void notEmpty(String value, String name, Object on) {
> +        if (on == null) {
> +            notNull(value, name);
> +        } else if (isEmpty(value)) {
> +            throw new IllegalArgumentException(name + " must be specified and not empty
on: " + on);
> +        }
> +    }
> +
> +    /**
>      * Tests whether the value is <tt>null</tt> or an empty string.
>      *
>      * @param value  the value, if its a String it will be tested for text length as
well
>
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message