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: [HEADS-UP] - Minor ObjectHelper refact to align null and empty check
Date Wed, 10 Dec 2008 12:57:38 GMT
2008/12/10 Claus Ibsen <claus.ibsen@gmail.com>:
> Hi
>
> Oh the remaining minor issue is whether we should also change the
> ObjectHelper.notNull method name to be aligned with the isXXX methods

isXXX performs a check. The notNull() performs an assertion (i.e.
throwing an exception if its not the case) so I think the names are
fine


> From:
> ObjectHelper.notNull
>
> To
> ObjectHelper.notEmpty
>
> As it's used in many components I didn't change the name right away.


notNull is fine for non-Strings; whereas notEmpty only really applies
to Strings and collections right?

So I think we should keep notNull for doing a purely not-null assertion

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

Open Source Integration
http://fusesource.com/

Mime
View raw message