[jdom-interest] Deleting deprecated constructor

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Apr 11 08:03:18 PDT 2002


Here's a quick patch that just deletes the deprecated in beta 7 
SAXHandler(Document) constructor; nothing else. All tests still run and 
everything compiles. I don't think this is too likely to affect most 
people's code.

-- 
+-----------------------+------------------------+-------------------+
| 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/input/SAXHandler.java
===================================================================
RCS file: /home/cvspublic/jdom/src/java/org/jdom/input/SAXHandler.java,v
retrieving revision 1.39
diff -d -u -r1.39 SAXHandler.java
--- src/java/org/jdom/input/SAXHandler.java	2002/03/15 05:36:48	1.39
+++ src/java/org/jdom/input/SAXHandler.java	2002/04/11 23:08:25
@@ -193,30 +193,13 @@
 
     /**
      * <p>
-     * This will set the <code>Document</code> to use.
-     * </p>
-     *
-     * @param document <code>Document</code> being parsed.
-     * @throws IOException when errors occur.
-     *
-     * @deprecated Deprecated in beta7, use SAXHandler() instead and let
-     * SAXHandler create the Document, then retrieve it with getDocument()
-     */
-    public SAXHandler(Document document) throws IOException {
-        this(new DefaultJDOMFactory());
-        this.document = document;
-    }
-
-    /**
-     * <p>
      * This will create a new <code>SAXHandler</code> that listens to SAX
      * events and creates a JDOM Document.  The objects will be constructed
      * using the default factory.
      * </p>
      *
-     * @throws IOException when errors occur.
      */
-    public SAXHandler() throws IOException {
+    public SAXHandler() {
         this((JDOMFactory)null);
     }
 
@@ -229,9 +212,8 @@
      *
      * @param factory <code>JDOMFactory</code> to be used for constructing
      * objects
-     * @throws IOException when errors occur.
      */
-    public SAXHandler(JDOMFactory factory) throws IOException {
+    public SAXHandler(JDOMFactory factory) {
         if (factory != null) {
             this.factory = factory;
         } else {


More information about the jdom-interest mailing list