[jdom-interest] Element.getText() bug

Brett McLaughlin brett.mclaughlin at lutris.com
Wed Sep 20 15:33:20 PDT 2000

Jason Peck wrote:
> I think I have found a bug in the 9/17/00 build of JDOM.
> When calling the getText() method of an element that has no data (ie.
> <user></user> ), the Element.getText() method throws a NullPointer
> exception.  However, if for some funny reason, I output the xml to screen
> using XMLOutputter first, the exception is not thrown.  I saw in a previous
> post that a change was made to XMLOutputter.output to change <user></user>
> to <user/> if no data is found between.  Shouldn't getText() either return
> NULL or "" if no text is found??

I just fixed this yesterday - try the latest from CVS.


> Thanks,
> Jason
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc. 
1200 Pacific Avenue, Suite 300 
Santa Cruz, CA 95060 USA 

More information about the jdom-interest mailing list