[jdom-interest] getText() returns null or ""

tsasala at hifusion.com tsasala at hifusion.com
Wed Oct 4 04:16:58 PDT 2000


	Although I like the idea of returning "", returning
null would be more consistent with the rest of the API.

	-Tom

Brett McLaughlin wrote:
> 
> Folks-
> 
> What's the deal with getText() returning null when it has no value?
> That's what the docs say, and I guess that one just slipped by me (I've
> been really busy lately ;-) ). In any case, that doesn't seem right -
> wouldn't it be better to return ""? Is there any functional difference
> between "" and null? It seems that returning null could cause
> NullPointerExceptions, while "" always insures you can compare Strings.
> 
> Thoughts? I'd like to suggest changing to returning the empty String
> when there's no value.
> 
> Thanks,
> Brett
> --
> Brett McLaughlin, Enhydra Strategist
> Lutris Technologies, Inc.
> 1200 Pacific Avenue, Suite 300
> Santa Cruz, CA 95060 USA
> http://www.lutris.com
> http://www.enhydra.org
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Thomas M. Sasala, Senior Developer             tsasala at hifusion.com     + 
+ HiFusion, Inc.                                 (W) 703.848.4441         +
+ 8180 Greensboro Dr, #500                       (F) 703.848.4420         +
+ McLean, VA  22102                                                       + 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the jdom-interest mailing list