From 351f44abd36eeb6ff4fc86179213231003d3bb93 Mon Sep 17 00:00:00 2001 From: patrickmann Date: Thu, 4 Jul 2024 12:50:36 +0200 Subject: [PATCH] quick fix TelemetryResponse for drawdown license --- .../graylog2/telemetry/rest/TelemetryResponseFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graylog2-server/src/main/java/org/graylog2/telemetry/rest/TelemetryResponseFactory.java b/graylog2-server/src/main/java/org/graylog2/telemetry/rest/TelemetryResponseFactory.java index c6ab97426ff4..0047696df91e 100644 --- a/graylog2-server/src/main/java/org/graylog2/telemetry/rest/TelemetryResponseFactory.java +++ b/graylog2-server/src/main/java/org/graylog2/telemetry/rest/TelemetryResponseFactory.java @@ -16,6 +16,7 @@ */ package org.graylog2.telemetry.rest; +import com.google.common.base.Strings; import org.graylog2.system.stats.elasticsearch.NodeInfo; import org.graylog2.telemetry.enterprise.TelemetryLicenseStatus; import org.joda.time.DateTime; @@ -160,6 +161,9 @@ private List filter(List telemet } private String formatLicenseString(TelemetryLicenseStatus telemetryLicenseStatus) { - return telemetryLicenseStatus.subject().replace("/", "_").substring(1); + if (!Strings.isNullOrEmpty(telemetryLicenseStatus.subject())) { + return telemetryLicenseStatus.subject().replace("/", "_").substring(1); + } + return ""; } }