[jdom-interest] private constructor for SAXHandler

Jason Hunter jhunter at servlets.com
Wed Apr 10 11:01:37 PDT 2002


It's fine to remove the constructor (we keep deprecated methods for one
beta cycle) and move any necessary code into the non-deprecated
constructor(s).

-jh-

Elliotte Rusty Harold wrote:
> 
> Working my through the code for SAXHandler as I worked on changing the
> exceptions for SAXBuilder.build(), I noticed the following:
> 
>     /**
>      * <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;
>     }
> 
> Since this was deprecated in beta-7, should we go ahead an mark this
> constructor private now? Or just move the relevant code into the other
> non-deprecated no-args constructor?
> 
> --
> +-----------------------+------------------------+-------------------+
> | 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/   |
> +----------------------------------+---------------------------------+
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list