Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Commit

Permalink
Backport #128 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 25, 2016
1 parent 7c71cb0 commit 87bb0d1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion release-notes/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Oliver Röss (cloudyday@github)
* Reported #98: Escape char is not being escaped during serialization
(2.6.4)

<<<<<<< HEAD
Justo Ruiz Ferrer (jrferrer@github)

* Contributed #89: Allow choice of using header-line declaration to reorder columns
Expand Down Expand Up @@ -84,3 +83,8 @@ Brian Moriarty (morbrian@github)

* Contributed #106: Null fields are always ignored when serializing list of objects
(2.7.0)

Peter Ansell (ansell@github)

* Contributed fix for #128: Write out headers even if no data rows written
(2.7.7)
5 changes: 5 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Project: jackson-dataformat-csv

No changes since 2.7.

2.7.7 (not yet released)

#128: Write out headers even if no data rows written
(contributed by Peter A)

2.7.6 (23-Jul-2016)
2.7.5 (11-Jun-2016)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ public void close() throws IOException

// Let's mark row as closed, if we had any...
finishRow();
// Write the header if necessary, occurs when no rows written
if (_handleFirstLine) {
_handleFirstLine();
}

_writer.close(_ioContext.isResourceManaged() || isEnabled(JsonGenerator.Feature.AUTO_CLOSE_TARGET));
}

Expand Down

0 comments on commit 87bb0d1

Please sign in to comment.