This repository was archived by the owner on Jan 22, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
src/main/java/com/fasterxml/jackson/dataformat/csv Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ Oliver Röss (cloudyday@github)
56
56
* Reported #98: Escape char is not being escaped during serialization
57
57
(2.6.4)
58
58
59
- <<<<<<< HEAD
60
59
Justo Ruiz Ferrer (jrferrer@github)
61
60
62
61
* Contributed #89: Allow choice of using header-line declaration to reorder columns
@@ -84,3 +83,8 @@ Brian Moriarty (morbrian@github)
84
83
85
84
* Contributed #106: Null fields are always ignored when serializing list of objects
86
85
(2.7.0)
86
+
87
+ Peter Ansell (ansell@github)
88
+
89
+ * Contributed fix for #128: Write out headers even if no data rows written
90
+ (2.7.7)
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ Project: jackson-dataformat-csv
8
8
9
9
No changes since 2.7.
10
10
11
+ 2.7.7 (not yet released)
12
+
13
+ #128: Write out headers even if no data rows written
14
+ (contributed by Peter A)
15
+
11
16
2.7.6 (23-Jul-2016)
12
17
2.7.5 (11-Jun-2016)
13
18
Original file line number Diff line number Diff line change @@ -425,6 +425,11 @@ public void close() throws IOException
425
425
426
426
// Let's mark row as closed, if we had any...
427
427
finishRow ();
428
+ // Write the header if necessary, occurs when no rows written
429
+ if (_handleFirstLine ) {
430
+ _handleFirstLine ();
431
+ }
432
+
428
433
_writer .close (_ioContext .isResourceManaged () || isEnabled (JsonGenerator .Feature .AUTO_CLOSE_TARGET ));
429
434
}
430
435
You can’t perform that action at this time.
0 commit comments