[
https://issues.apache.org/jira/browse/CSV-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14204268#comment-14204268
]
Gary Gregory commented on CSV-140:
----------------------------------
I see. Calling getObject would work but seems a waste since we'd create a Java
Object (like a Number) that is only used for an instanceof check. It would be
better to use the ResultSet metadata to figure out the type of a column once.
Thoughts?
> 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)