[jdom-commits] getChildTextNormalize()

Kent C. Johnson kentyman23 at hotmail.com
Sat Sep 29 19:43:37 PDT 2001


earlier on jdom-interest i was talking about adding the 
getChildTextNormalize() methods to Element.java, since getChildText() and 
getChildTextTrim() exist.  i'm am completely new to the project, and in fact 
new to any open source project, so i'm not sure how things get decided 
around here (vote on things / just gets decided Jason and Brett / whatever). 
  anyway, i think that either getChildTextNormalize() needs to be added to 
Element.java, or that method and all the other getChildText*() methods need 
to be moved to a helper class.  i have a patch which adds the 
getChildTextNormalize() methods to Element.java 
(Element+getChildTextNormalize.patch).  i also have a patch which takes all 
of those methods out of Element.java (Element-getChildText_deleted.patch), 
along with a working version of a helper class (JDOMHelper.java).  i will 
attach these 3 files.
since this is my first submission i hope someone is able to check my work, 
though i have already tested by hand.  also, i didn't know how it worked 
adding the @author to the javadocs, so i added my name in JDOMHelper.java 
and Element+getChildTextNormalize.patch.  in the latter of the two, since i 
basically just copied and modified code, perhaps my name should be taken out 
of the javadocs (but if not, that would be cool :) ).  i didn't put my name 
in for the Element-getChildText_deleted.patch, since it just deletes code. 
:)
if you have any questions regarding these changes please ask me.  also note 
that some might argue that all the getText*() methods should be part of the 
JDOMHelper, but i disagreed, so i didn't do it yet.  if y'all think they all 
need to move, i can do that too.
oh, i was just thinking, maybe we would just deprecate the getChildText*() 
methods in Element.java, so it doesn't break old code.  if so, 
Element-getChildText_deleted.patch won't be useful.  i will also include a 
patch Element-getChildText_deprecated.patch which will just mark those 
methods as deprecated.
one more thing, please check to make sure i did the javadocs right.  i'm 
pretty sure i did, but i had never played with it before today.

quick recap of files:
Element+getChildTextNormalize.patch - patch adds getChildTextNormalize() 
methods
Element-getChildText_deleted.patch - patch deleted all getChildText*() 
methods
Element-getChildText_deprecated.patch - patch deprecated all getChildText*() 
methods
JDOMHelper.java - helper class with static versions of all getChildText*() 
methods including getChildTextNormalize()

thanks for considering my work,
kent

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JDOMHelper.java
Type: application/octet-stream
Size: 7209 bytes
Desc: not available
Url : http://servlets.com/pipermail/jdom-commits/attachments/20010929/a6cde461/JDOMHelper.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Element getChildTextNormalize.patch
Type: application/octet-stream
Size: 3586 bytes
Desc: not available
Url : http://servlets.com/pipermail/jdom-commits/attachments/20010929/a6cde461/ElementgetChildTextNormalize.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Element-getChildText_deleted.patch
Type: application/octet-stream
Size: 4356 bytes
Desc: not available
Url : http://servlets.com/pipermail/jdom-commits/attachments/20010929/a6cde461/Element-getChildText_deleted.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Element-getChildText_deprecated.patch
Type: application/octet-stream
Size: 3134 bytes
Desc: not available
Url : http://servlets.com/pipermail/jdom-commits/attachments/20010929/a6cde461/Element-getChildText_deprecated.obj


More information about the jdom-commits mailing list