Hi all,
in my opinion all the setter methods should be removed from the CSVStrategy
class: in this way the fields will only be set using the constructors and they
will become readonly.
The main issue I see with the current implementation is that a calling method
can modify the values of the fields of the following static objects declared in
CSVStrategy (changing the default behavior for all subsequent code that uses
for example CSVStrategy.DEFAULT_STRATEGY):
public static CSVStrategy DEFAULT_STRATEGY = new CSVStrategy(',', '"',
COMMENTS_DISABLED, ESCAPE_DISABLED, true,
true, false,
true);
public static CSVStrategy EXCEL_STRATEGY = new CSVStrategy(',', '"',
COMMENTS_DISABLED, ESCAPE_DISABLED, false,
false, false,
false);
public static CSVStrategy TDF_STRATEGY = new CSVStrategy('\t', '"',
COMMENTS_DISABLED, ESCAPE_DISABLED, true,
true, false,
true);
What do you think?
Jacopo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]