commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janek Bogucki <...@studylink.com>
Subject RE: [lang] Pre 2.0 StringUtils NPE changes
Date Fri, 18 Jul 2003 16:02:15 GMT
On Fri, 2003-07-18 at 13:49, Hope, Matthew wrote:
> interesting problem... 
> 
> "empty string" has a very clear meaning in java, it is a non null String
> object of zero length.
> 
> Does the entrenched user base merit retaining a non standard naming
> convention.
> 
> or is Empty sufficiently entrenched to also mean null? (I don't think it is)
> 
> I appreciate the dilemma but as a user would prefer it if the convention of
> empty stayed as "" and only "". (but swallowing nulls and returning false id
> just the ticket)
> 
> My 2 cents
> 
> Matt

This is the same as way I always interpret 'empty' in the context of a
Java String object. A empty String is a zero length String, not a null
object reference.

I can easily see that equating a null to an empty String is convenient
but I'd be happy to be explicit about this assumed equivalence in my
code than have a method with a slightly misleading name.

-Janek

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