Skip to content

Commit fe49c05

Browse files
committed
AS-4027: add string write function
This function was recently changed causing a failure in broker metrics. This is a temporary fix until the issue is fully resolved.
1 parent 7b7d335 commit fe49c05

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pulsar-common/src/main/java/org/apache/pulsar/common/util/SimpleTextOutputStream.java

+9
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ public SimpleTextOutputStream write(char c) {
5656
return this;
5757
}
5858

59+
public SimpleTextOutputStream write(String s) {
60+
if (s == null) {
61+
return this;
62+
}
63+
64+
buffer.writeCharSequence(s, CharsetUtil.UTF_8);
65+
return this;
66+
}
67+
5968
public SimpleTextOutputStream write(CharSequence s) {
6069
if (s == null) {
6170
return this;

0 commit comments

Comments
 (0)