commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Commented) (JIRA)" <>
Subject [jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch
Date Thu, 29 Mar 2012 19:16:22 GMT


Sebb commented on CSV-88:

bq. PRISTINE is useless as a base format because all properties have to be defined.

No, it's not useless; that's why it was created as empty.

The PRISTINE format provides a base that is untainted by existing settings, which is why it
works well for creating the pre-defined public formats.

The only setting that is absolutely required is the delimiter, which is why I suggested providing
a ctor which takes the delimiter as its only parameter.

As I see it, there are the following possibilities for creating a new basic format using :
as the delimiter.

fmt1 = new CSVFormat(':');
fmt2 = new CSVFormat().withDelimiter(':');
fmt3 = CSVFormat.PRISTINE.withDelimiter(':');
fmt4 = CSVFormat.newInstance(':');
fmt5 = CSVFormat.newInstance().withDelimiter(':');

Obviously the constant name PRISTINE can be changed, or the newInstance() method could be
> Not possible to create a CSVFormat from scratch
> -----------------------------------------------
>                 Key: CSV-88
>                 URL:
>             Project: Commons CSV
>          Issue Type: Bug
>            Reporter: Sebb
> It's not possible to create a CSVFormat except by modifying an existing format.
> Could either make the PRISTINE format public, or provide a constructor with a single
parameter (the delimiter).
> Could provide a no-args ctor instead, but there seems little point in that.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message