[jdom-interest] Redundant Indent methods in XMLOutputter

Jason Hunter jhunter at servlets.com
Tue Apr 9 16:50:04 PDT 2002


This should definitely be fixed.  I'm not sure of the genesis of all
this.  Personally, I think setIndent(String) is fine.

Brad, you worked on the code a little while ago.  Any commentary?

-jh-

Elliotte Rusty Harold wrote:
> 
> There are four separate indent methods in XMLOutputter, none of which
> are marked as deprecated:
> 
> public void *setIndent*(java.lang.String indent)
> public void *setIndent*(boolean doIndent)
> public void *setIndent*(int size)
> public void *setIndentSize*(int indentSize)
> 
> The last two methods appear to do exactly the same thing.  I suggest we
> deprecate and eventually delete one of these two methods.
> 
> I also suggest that we either remove * setIndent*(boolean doIndent) or
> that we replace the first two methods with two separate methods like this:
> 
> setIndentString(String indent)
> setDoIndent(boolean true)
> 
> Right now it's quite confusing to figure wout whether or not you've
> actually uscceeded in turning on indenting in the event of a conflict
> between the setIndent methods.
> 
> --
> +-----------------------+------------------------+-------------------+
> | 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