[jdom-interest] getChildTextNormalize()
Kent C. Johnson
kentyman23 at hotmail.com
Mon Oct 1 09:33:23 PDT 2001
(resending this, as i sent to jdom-commits at jdom.org last time :) )
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, probably 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 deletes 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://jdom.org/pipermail/jdom-interest/attachments/20011001/8794adb8/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://jdom.org/pipermail/jdom-interest/attachments/20011001/8794adb8/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://jdom.org/pipermail/jdom-interest/attachments/20011001/8794adb8/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://jdom.org/pipermail/jdom-interest/attachments/20011001/8794adb8/Element-getChildText_deprecated.obj
More information about the jdom-interest
mailing list