zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddiede...@apache.org
Subject [zookeeper] branch master updated: ZOOKEEPER-3688: Use StandardCharsets UTF-8 in Jute toString
Date Wed, 04 Nov 2020 07:44:06 GMT
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 <dmollitor@apache.org>
AuthorDate: Wed Nov 4 07:43:20 2020 +0000

    ZOOKEEPER-3688: Use StandardCharsets UTF-8 in Jute toString
    
    Author: David Mollitor <dmollitor@apache.org>
    
    Reviewers: Christopher Tubbs <ctubbsii@apache.org>, Enrico Olivelli <eolivelli@apache.org>,
maoling <maoling199210191@sina.com>, Damien Diederen <ddiederen@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");


Mime
View raw message