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

Commit

Permalink
issue-128 : Fix #128 by writing header during close if necessary
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Ansell <[email protected]>
  • Loading branch information
ansell committed Aug 22, 2016
1 parent feda1a2 commit 6637c03
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,12 @@ 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 6637c03

Please sign in to comment.