Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B4A2B186B4 for ; Wed, 17 Jun 2015 18:13:24 +0000 (UTC) Received: (qmail 15761 invoked by uid 500); 17 Jun 2015 18:13:21 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 15660 invoked by uid 500); 17 Jun 2015 18:13:21 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 15351 invoked by uid 99); 17 Jun 2015 18:13:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2015 18:13:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 605BAE3C61; Wed, 17 Jun 2015 18:13:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lukaszlenart@apache.org To: commits@struts.apache.org Date: Wed, 17 Jun 2015 18:13:30 -0000 Message-Id: <97dd9a3a1d9e4fd9a964f6499a5d5884@git.apache.org> In-Reply-To: <83cd04cbdd2b43748ee2d213c7b8321b@git.apache.org> References: <83cd04cbdd2b43748ee2d213c7b8321b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/11] struts git commit: WW-4515 Convert try blocks to try-with-resources WW-4515 Convert try blocks to try-with-resources Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/0b19499f Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/0b19499f Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/0b19499f Branch: refs/heads/master Commit: 0b19499ffd78f44a6dd8b767e9995c980efeb01f Parents: c71c3de Author: Aaron Johnson Authored: Wed Jun 17 09:49:26 2015 -0500 Committer: Aaron Johnson Committed: Wed Jun 17 09:49:26 2015 -0500 ---------------------------------------------------------------------- .../org/apache/struts2/views/jasperreports/JasperReportsResult.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/0b19499f/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java ---------------------------------------------------------------------- diff --git a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java index a64a48a..1beffbc 100644 --- a/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java +++ b/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java @@ -396,6 +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); outputStream.flush(); } catch (IOException e) { LOG.error("Error writing report output", e);