zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] TisonKun commented on a change in pull request #983: ZOOKEEPER-3391: Drop unused RecFormat(CSV/XML)
Date Fri, 14 Jun 2019 05:58:17 GMT
TisonKun commented on a change in pull request #983: ZOOKEEPER-3391: Drop unused RecFormat(CSV/XML)
URL: https://github.com/apache/zookeeper/pull/983#discussion_r293667797
 
 

 ##########
 File path: zookeeper-jute/src/main/java/org/apache/jute/ToStringOutputArchive.java
 ##########
 @@ -90,14 +85,14 @@ public void writeDouble(double d, String tag) throws IOException {
     
     public void writeString(String s, String tag) throws IOException {
         printCommaUnlessFirst();
-        stream.print(Utils.toCSVString(s));
+        stream.print(escapeString(s));
         throwExceptionOnError(tag);
     }
     
-    public void writeBuffer(byte buf[], String tag)
+    public void writeBuffer(byte[] buf, String tag)
     throws IOException {
         printCommaUnlessFirst();
-        stream.print(Utils.toCSVBuffer(buf));
+        stream.print(escapeBuffer(buf));
         throwExceptionOnError(tag);
     }
 
 Review comment:
   1. `escapeBuffer` and `escapeString` originally for `CSVOutputArchive`, in fact we don't
need them anywhere outside and thus to be private. As mentioned above, I keep `CSVOutputArchive`(rename
to `ToStringOutputArchive`) for backward compatibility(`toString` method of jute generated
classes).
   
   2. As linked in description(http://zookeeper-user.578899.n2.nabble.com/Deprecated-CSVInputArchive-and-XMLInputArchive-td7584086.html),
we actually remove support for XML/CSV RecFormat, and thus there is no backward compatibility
guarantee.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message