Just to wrap up this thread, this has been fixed in svn. Gary
On Sat, Nov 1, 2014 at 12:52 AM, Gary Gregory <garydgreg...@gmail.com> wrote: > Hi Damjan, > > I think the process should be: create a JIRA, optionally attach a patch > (or commit a fix, up to you) that includes a unit test that demonstrates > that there is in fact a bug to fix. The test should fail without the fix of > course. > > Thank you, > Gary > > On Sat, Nov 1, 2014 at 12:33 AM, Damjan Jovanovic <dam...@apache.org> > wrote: > >> Hi >> >> Is there some reason CSVPrinter.printRecords(final ResultSet >> resultSet) retrieves all fields from the ResultSet using >> ResultSet.getString(), which makes QuoteMode.NON_NUMERIC quote >> numbers? >> >> This seems to work a lot better: >> >> Index: src/main/java/org/apache/commons/csv/CSVPrinter.java >> =================================================================== >> --- src/main/java/org/apache/commons/csv/CSVPrinter.java (revision >> 1635890) >> +++ src/main/java/org/apache/commons/csv/CSVPrinter.java (working copy) >> @@ -512,7 +512,7 @@ >> } >> while (resultSet.next()) { >> for (int i = 1; i <= columnCount; i++) { >> - print(resultSet.getString(i)); >> + print(resultSet.getObject(i)); >> } >> println(); >> } >> >> >> Can I commit? >> >> Thank you >> Damjan >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org >> >> > > > -- > E-Mail: garydgreg...@gmail.com | ggreg...@apache.org > Java Persistence with Hibernate, Second Edition > <http://www.manning.com/bauer3/> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > Spring Batch in Action <http://www.manning.com/templier/> > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory