[jdom-interest] Null line separators

Elliotte Rusty Harold elharo at metalab.unc.edu
Sat Jul 8 15:39:14 PDT 2000


I'm updating the XMLOutputter class to allow setting of the line
separator string. The basic signature will be 

  public void setLineSeparator(String lineSeparator) 

Wjat should happen if the argument is null? My inclination is to throw a
NullPointerException.

How about if it's the empty string? My inclination in that case is just
to set the line separator to the empty string. However, this raises the
question of whether we need both a lineSeparator property and a newlines
property. Maybe we should replace the whole newlines property with the
ability to set an empty lineSeparator string. Thoughts?

-- 
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|               Java I/O (O'Reilly & Associates, 1999)               |
|            http://metalab.unc.edu/javafaq/books/javaio/            |
|   http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ | 
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list