struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [1/7] struts git commit: Patch WW-3945
Date Mon, 04 Jan 2016 20:07:04 GMT
Repository: struts
Updated Branches:
  refs/heads/master 3b38ccea5 -> acd55986f


Patch WW-3945

Set default encoding for JSONResult to UTF-8

Now the default encoding is UTF-8 for JSON as should be.

Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f9b7ebb8
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f9b7ebb8
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f9b7ebb8

Branch: refs/heads/master
Commit: f9b7ebb87eb2beeffb2ca1b0f3b421b0cef4d658
Parents: 38da3f6
Author: Victor Sosa <victornsosa@gmail.com>
Authored: Sun Jan 3 08:05:03 2016 -0400
Committer: Victor Sosa <victornsosa@gmail.com>
Committed: Mon Jan 4 12:14:39 2016 -0400

----------------------------------------------------------------------
 .../struts2/views/jasperreports/JasperReportsResult.java       | 6 +++++-
 .../json/src/main/java/org/apache/struts2/json/JSONResult.java | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/f9b7ebb8/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 921a010..e0ea121 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
@@ -386,7 +386,11 @@ public class JasperReportsResult extends StrutsResultSupport implements
JasperRe
             LOG.error("Error producing {} report for uri {}", format, systemId, e);
             throw new ServletException(e.getMessage(), e);
         } finally {
-            conn.close();
+            try {
+                conn.close();
+            } catch (Exception e) {
+                LOG.warn("Could not close db connection properly", e);
+            }
         }
 
         response.setContentLength(output.size());

http://git-wip-us.apache.org/repos/asf/struts/blob/f9b7ebb8/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index 3475be0..5f14a8d 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@ -80,7 +80,7 @@ public class JSONResult implements Result {
     public static final String DEFAULT_PARAM = null;
 
     private String encoding;
-    private String defaultEncoding = "ISO-8859-1";
+    private String defaultEncoding = "UTF-8";
     private List<Pattern> includeProperties;
     private List<Pattern> excludeProperties;
     private String root;


Mime
View raw message