You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by dd...@apache.org on 2020/11/04 07:44:06 UTC
[zookeeper] branch master updated: ZOOKEEPER-3688: Use
StandardCharsets UTF-8 in Jute toString
This is an automated email from the ASF dual-hosted git repository.
ddiederen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 7d47a17 ZOOKEEPER-3688: Use StandardCharsets UTF-8 in Jute toString
7d47a17 is described below
commit 7d47a1792170099276c28456eea523d4d1067a6c
Author: David Mollitor <dm...@apache.org>
AuthorDate: Wed Nov 4 07:43:20 2020 +0000
ZOOKEEPER-3688: Use StandardCharsets UTF-8 in Jute toString
Author: David Mollitor <dm...@apache.org>
Reviewers: Christopher Tubbs <ct...@apache.org>, Enrico Olivelli <eo...@apache.org>, maoling <ma...@sina.com>, Damien Diederen <dd...@apache.org>
Closes #1216 from belugabehr/ZOOKEEPER-3688
---
zookeeper-jute/src/main/java/org/apache/jute/compiler/JRecord.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zookeeper-jute/src/main/java/org/apache/jute/compiler/JRecord.java b/zookeeper-jute/src/main/java/org/apache/jute/compiler/JRecord.java
index 7c73ded..13cb1ed 100644
--- a/zookeeper-jute/src/main/java/org/apache/jute/compiler/JRecord.java
+++ b/zookeeper-jute/src/main/java/org/apache/jute/compiler/JRecord.java
@@ -498,7 +498,7 @@ public class JRecord extends JCompType {
jj.write(jf.genJavaWriteMethodName());
}
jj.write(" a_.endRecord(this,\"\");\n");
- jj.write(" return new String(s.toByteArray(), \"UTF-8\");\n");
+ jj.write(" return new String(s.toByteArray(), java.nio.charset.StandardCharsets.UTF_8);\n");
jj.write(" } catch (Throwable ex) {\n");
jj.write(" ex.printStackTrace();\n");
jj.write(" }\n");