struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [10/11] struts git commit: WW-4515 Convert try blocks to try-with-resources
Date Wed, 17 Jun 2015 18:13:30 GMT
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 <aaron.johnson@pearson.com>
Authored: Wed Jun 17 09:49:26 2015 -0500
Committer: Aaron Johnson <aaron.johnson@pearson.com>
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);


Mime
View raw message