From ba251fc51738194941f7497b309ce86d7c63164c Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Mon, 5 Feb 2024 14:12:39 -0800 Subject: [PATCH] Fixed writeTo. Signed-off-by: AWSHurneyt --- src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt index 4c4c211b..38726aed 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt @@ -363,7 +363,7 @@ data class Alert( } out.writeOptionalString(executionId) out.writeStringCollection(associatedAlertIds) - if (!clusters.isNullOrEmpty()) out.writeStringArray(clusters.toTypedArray()) + out.writeOptionalStringArray(clusters?.toTypedArray()) } companion object {