You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/23 08:35:22 UTC

[GitHub] [pulsar] asafm commented on a diff in pull request #18138: [fix][monitor] fix metrics string encoding

asafm commented on code in PR #18138:
URL: https://github.com/apache/pulsar/pull/18138#discussion_r1002666681


##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/SimpleTextOutputStream.java:
##########
@@ -43,19 +44,16 @@ public SimpleTextOutputStream write(byte[] a, int offset, int len) {
     }
 
     public SimpleTextOutputStream write(char c) {
-        buffer.writeByte((byte) c);
+        write(String.valueOf(c));

Review Comment:
   I wouldn't do that, since we're back to the same bug if some future developer decides to use it wrong.
   I prefer to abolish that method altogether and refactor it to use String instead.



-- 
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-unsubscribe@pulsar.apache.org

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