struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [11/11] struts git commit: WW-4515 Convert try blocks to try-with-resources
Date Wed, 17 Jun 2015 18:13:31 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/86da1ea8
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/86da1ea8
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/86da1ea8

Branch: refs/heads/master
Commit: 86da1ea8c2fec919bb3c94ceeb9c29f1acf04276
Parents: 0b19499
Author: Aaron Johnson <aaron.johnson@pearson.com>
Authored: Wed Jun 17 09:51:25 2015 -0500
Committer: Aaron Johnson <aaron.johnson@pearson.com>
Committed: Wed Jun 17 09:51:25 2015 -0500

----------------------------------------------------------------------
 .../apache/struts2/views/jasperreports/JasperReportsResult.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/86da1ea8/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 1beffbc..56cd4b0 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,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);


Mime
View raw message