Failing to close the streamwriter means it will not output its
trailer in all cases. Fix that.
Change-Id: I218cea9ff61fbc7c33ccab75638dda9a4f20b391
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
LOG.warn("Error writing error response body", e);
}
LOG.warn("Error writing error response body", e);
}
+ try {
+ streamWriter.close();
+ } catch (IOException e) {
+ LOG.warn("Failed to close stream writer", e);
+ }
+
try {
return outStream.toString(StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
try {
return outStream.toString(StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {