[ 
https://issues.apache.org/jira/browse/CSV-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241211#comment-13241211
 ] 

Sebb commented on CSV-78:
-------------------------

I no longer like the idea of using a null Character to disable the setting, as 
it entails implicit or explicit boxing for the user code.

Option 2) above was intended to allow the existing char (if any) to be 
preserved.
However, using setEscape(true) would need to check if an escape had been set, 
so I think it was not a good idea either.

Another possibility would be to provide no-arg versions of the with() methods.

{noformat}
1) withNoEscape()     withNoEncapsulator()     withNoCommentStart()
3) withEscape()       withEncapsulator()       withCommentStart()
4) withEscapeNone()   withEncapsulatorNone()   withCommentStartNone()
{noformat}

Option4 above is just option 1 renamed to look more like the existing methods.

Other renames are possible.
                
> Use Character instead of char for char fields except delimiter
> --------------------------------------------------------------
>
>                 Key: CSV-78
>                 URL: https://issues.apache.org/jira/browse/CSV-78
>             Project: Commons CSV
>          Issue Type: Improvement
>            Reporter: Sebb
>
> Apart from the delimiter - which must be specified (obviously) - the other 
> char fields are optional.
> At present it's not possible to create a new format from an existing format 
> and remove (say) the encapsulation character.
> If the parameters were changed to Character instead of char, then it would be 
> possible to pass null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to