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

Damjan Jovanovic commented on CSV-140:
--------------------------------------

Well CSVPrinter.printRecords(final ResultSet resultSet) calls 
CSVPrinter.print(final Object value) just like every other CSVPrinter printing 
method, so exactly the same thing will happen that happens otherwise in 
QuoteMode.NON_NUMERIC with comma as the locale decimal separator. If numbers 
should be quoted when their decimal separator matches the field separator, 
that's QuoteMode.MINIMAL, which will check the field's contents and quote it if 
necessary. Whether QuoteMode.NON_NUMERIC should be doing the same, is a 
separate question.


> QuoteMode.NON_NUMERIC doesn't work with CSVPrinter.printRecords(ResultSet)
> --------------------------------------------------------------------------
>
>                 Key: CSV-140
>                 URL: https://issues.apache.org/jira/browse/CSV-140
>             Project: Commons CSV
>          Issue Type: Bug
>          Components: Printer
>    Affects Versions: 1.0
>            Reporter: Damjan Jovanovic
>            Priority: Minor
>              Labels: patch
>         Attachments: commons-csv-getobject.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
>  CSVPrinter.printRecords(final ResultSet resultSet) retrieves all fields from 
> the ResultSet using ResultSet.getString(), which makes QuoteMode.NON_NUMERIC 
> unnecessarily quote numbers.
> ResultSet.getObject() could be used instead. Any reason why it wasn't?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to