WW-4515 Convert try blocks to try-with-resources

This commit is contained in:
Aaron Johnson
2015-06-17 09:51:25 -05:00
parent 0b19499ffd
commit 86da1ea8c2
@@ -396,7 +396,7 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
*/
private void writeReport(HttpServletResponse response, ByteArrayOutputStream output) throws ServletException {
try (OutputStream outputStream = response.getOutputStream()) {
output.writeTo(output);
output.writeTo(outputStream);
outputStream.flush();
} catch (IOException e) {
LOG.error("Error writing report output", e);