Document why original object is needed

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2013-05-06 23:29:45 +00:00
parent c616a17650
commit 02c1b35939
1 changed files with 2 additions and 0 deletions

View File

@ -164,6 +164,7 @@ public class CSVPrinter implements Flushable, Closeable {
private void print(final Object object, final CharSequence value,
final int offset, final int len) throws IOException {
if (format.isQuoting()) {
// the original object is needed so can check for Number
printAndQuote(object, value, offset, len);
} else if (format.isEscaping()) {
printAndEscape(value, offset, len);
@ -225,6 +226,7 @@ public class CSVPrinter implements Flushable, Closeable {
/*
* Note: must only be called if quoting is enabled, otherwise will generate NPE
*/
// the original object is needed so can check for Number
void printAndQuote(final Object object, final CharSequence value,
final int offset, final int len) throws IOException {
final boolean first = newRecord; // is this the first value on this line?