[jdom-interest] Document exception patch

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed May 15 19:53:18 PDT 2002


The attached patch adds @throws IllegalDataException doc comments to 
several constructors in Document. The exceptions actually thrown haven't 
changed. I'm just documenting them better.

-- 
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|           The XML Bible, 2nd Edition (IDG Books, 2001)             |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:   http://www.cafeaulait.org/     | 
|  Read Cafe con Leche for XML News:  http://www.cafeconleche.org/   |
+----------------------------------+---------------------------------+


-------------- next part --------------
Index: src/java/org/jdom/Document.java
===================================================================
RCS file: /home/cvspublic/jdom/src/java/org/jdom/Document.java,v
retrieving revision 1.60
diff -d -u -r1.60 Document.java
--- src/java/org/jdom/Document.java	2002/04/29 13:38:15	1.60
+++ src/java/org/jdom/Document.java	2002/05/16 10:59:03
@@ -104,6 +104,9 @@
      *
      * @param rootElement <code>Element</code> for document root.
      * @param docType <code>DocType</code> declaration.
+     * @throws IllegalAddException if the given docType object 
+     *         is already attached to a document or the given 
+     *         rootElement already has a parent
      */
     public Document(Element rootElement, DocType docType) {
         if (rootElement != null)
@@ -118,6 +121,8 @@
      * declaration.
      *
      * @param rootElement <code>Element</code> for document root
+     * @throws IllegalAddException if the given rootElement already has
+     *         a parent.
      */
     public Document(Element rootElement) {
         this(rootElement, null);


More information about the jdom-interest mailing list