Skip to content

Commit

Permalink
Fix NPE when label value is null
Browse files Browse the repository at this point in the history
Signed-off-by: max-melentyev <[email protected]>
  • Loading branch information
max-melentyev authored Jan 20, 2025
1 parent 0ee705c commit fe49d77
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ static void writeTimestamp(Writer writer, long timestampMs) throws IOException {
}

static void writeEscapedLabelValue(Writer writer, String s) throws IOException {
if (s == null) {
return;
}
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
switch (c) {
Expand Down

0 comments on commit fe49d77

Please sign in to comment.