[jdom-interest] Document.getRootElement()
rohit dehar
rohit_dehar at yahoo.com
Tue Jun 13 11:41:49 PDT 2000
The code has it throwing an exception not returning a null.
I suppose javadoc comments have to be modified to:
/**
* <p>
* This will return the root <code>Element</code>
* for this <code>Document</code>, or throws an
* exception, if there is none.
* </p>
*
* @return <code>Element</code> - the document's root element
* @throws <code>NoSuchElementException</code> - when no root
* element exists.
*/
Rohit
--- Ernst de Haan <ernst at jollem.com> wrote:
> Hi,
>
>
> The Javadoc for org.jdom.Document says:
>
> public Element getRootElement() throws NoSuchElementException
>
> This will return the root Element for this Document, or null if
> there
> is none.
>
> Returns:
> Element - the document's root element
> Throws:
> NoSuchElementException - - when no root element exists.
>
>
> There is a contradiction here: Does the method return null or does
> it
> throw a NoSuchElementException?
>
>
> Ernst
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com
More information about the jdom-interest
mailing list