merlimat commented on code in PR #22494:
URL: https://github.com/apache/pulsar/pull/22494#discussion_r1562981115


##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/SimpleTextOutputStream.java:
##########
@@ -44,7 +46,8 @@ public SimpleTextOutputStream write(byte[] a, int offset, int 
len) {
     }
 
     public SimpleTextOutputStream write(char c) {
-        write(String.valueOf(c));
+        singleCharBuffer.put(0, c);
+        buffer.writeCharSequence(singleCharBuffer, CharsetUtil.UTF_8);

Review Comment:
   👍 I think the original `writeByte()` was appropriate here for the single 
char. This is only used for `{`, `'` and `"` characters, it will never have any 
non ascii chars



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to