You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Colebourne <sc...@btopenworld.com> on 2003/11/24 00:44:42 UTC

Re: [lang] new functionality in some of the commons classes - contd

I would suggest that if you are writing
  if(x == null || x.equals("null"))
then some code higher up the JSP isn't right. A string should not reach the
case where it contains the text "null".

I would be -1 to adding this to [lang].

Stephen

> On Sun, 23 Nov 2003, Ash .. wrote:
> > Adding to my earlier email I just sent out, I wish to give an example
here,
> > of some of the ideas I have.
> >
> > The concept of a "naught" String.
> >
> > A String is naught if it is either 'null' or is the literal "null".
> >
> > I have often encountered this situation in my JSP project where a
particular
> > parameter is passed in
> > as x=null, and I need to insert code everytime saying if(x == null ||
> > x.equals("null"))
> >
> > Perhaps others have encountered a similar situation. I thus propose the
> > following functionality in the
> > org.apache.commons.lang.StringUtils class:
> >
> > StringUtils.isNaught(String str)
> >
> >
> > And more such to go. Waiting for some feedback.
> > Thanks,
> > Ash
> >
> >
> > -----Original Message-----
> > From: ASHWIN Suresh
> > Sent: Saturday, November 22, 2003 20:47
> > To: 'Jakarta Commons Developers List'
> > Subject: new functionality in some of the commons classes
> >
> >
> > Hello all,
> >
> > I am new to the list, and am here after my recent (and really exciting)
> > discovery of the existence of this whole treasure of day-to-day usage
> > code in the name of the Commons project.
> >
> > I would like to propose/contribute some new functionality to some
> > of the classes (mostly simple stuff). Do let me know the procedure
> > for this. If there is a standard document which explains this,
> > which I missed, please give me a pointer to it.
> >
> > Thanks,
> >
> > _________________________________________________________________
> > Stay in touch with absent friends - get MSN Messenger
> > http://www.msn.co.uk/messenger
> >
> >
> > ---------------------------------------------------------------------
> > 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
>


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