Ensure Jackson generator flushed

Closes gh-22771
This commit is contained in:
Rossen Stoyanchev
2019-04-12 15:26:21 -04:00
parent 722cd179cf
commit 0109231d8e
2 changed files with 21 additions and 2 deletions

View File

@@ -172,6 +172,7 @@ public abstract class AbstractJackson2Encoder extends Jackson2CodecSupport imple
try {
JsonGenerator generator = getObjectMapper().getFactory().createGenerator(outputStream, encoding);
writer.writeValue(generator, value);
generator.flush();
release = false;
}
catch (InvalidDefinitionException ex) {