On Tue, Dec 9, 2008 at 8:58 AM, <[EMAIL PROTECTED]> wrote: > Sounds good. By 'empty' we mean either null or zero length right? Yes excatly.
On trunk I have added a variation of the notNull that accepts a 3rd parameter to indicate a "at" or to append at.toString(). This is useful in the model package where we can report the type that raised the problem (using it's nice toString) So end users will get a little bit more help there. > > > On 08/12/2008, Claus Ibsen <[EMAIL PROTECTED]> wrote: >> Hi >> >> Now that we have the chance to change the API for Camel 2.0 I have a >> few very minor issues as well. >> >> We have methods on ObjectHelper for assertions of null and if strings >> is provided or not. >> We currently have a mix of String assertions methods that use *empty* >> or *blank* to indicate if a string is provided or not. >> >> I think we should align and only use either *blank* or *empty* for >> "empty" strings >> >> Personally I am used to empty >> >> ObjectHelper.isNotNullOrNonEmpty(String s); >> And this cryptic name could be consider renamed to >> >> ObjectHelper.isNotEmpty(String s); >> ObjectHelper.isEmpty(String s); >> >> We could have just object parameters and if the type is a string we >> can do the cast to string and do the trim.length > 0 test. >> So we only have these two methods to remember >> ObjectHelper.isNotEmpty(Object s); >> ObjectHelper.isEmpty(Object s); >> >> They will test for null and trim strings if its a string type. >> >> Am I making myself clear? >> >> >> /Claus Ibsen >> Apache Camel Committer >> Blog: http://davsclaus.blogspot.com/ >> > > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://fusesource.com/ >
