Skip to content

Commit 02c1b35

Browse files
committed
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
1 parent c616a17 commit 02c1b35

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/org/apache/commons/csv/CSVPrinter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ public void printComment(final String comment) throws IOException {
164164
private void print(final Object object, final CharSequence value,
165165
final int offset, final int len) throws IOException {
166166
if (format.isQuoting()) {
167+
// the original object is needed so can check for Number
167168
printAndQuote(object, value, offset, len);
168169
} else if (format.isEscaping()) {
169170
printAndEscape(value, offset, len);
@@ -225,6 +226,7 @@ void printAndEscape(final CharSequence value, final int offset, final int len) t
225226
/*
226227
* Note: must only be called if quoting is enabled, otherwise will generate NPE
227228
*/
229+
// the original object is needed so can check for Number
228230
void printAndQuote(final Object object, final CharSequence value,
229231
final int offset, final int len) throws IOException {
230232
final boolean first = newRecord; // is this the first value on this line?

0 commit comments

Comments
 (0)