From 9ae4b56c2af4ee65fa935d99b298c98b7cc4bc63 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 27 Mar 2017 12:16:34 -0700 Subject: [PATCH] [CSV-203] withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17. --- src/main/java/org/apache/commons/csv/CSVFormat.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index a0382a37..259ea283 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -362,7 +362,8 @@ public final class CSVFormat implements Serializable { .withIgnoreEmptyLines(false) .withQuote(null) .withRecordSeparator(LF) - .withNullString("\\N"); + .withNullString("\\N") + .withQuoteMode(QuoteMode.ALL_NON_NULL); // @formatter:off /**