From a2fb0fd08983355a57d3594519410052903250a9 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Thu, 19 Sep 2024 10:16:28 -0400 Subject: [PATCH] Add null check Signed-off-by: Craig Perkins --- server/src/main/java/org/opensearch/plugins/PluginInfo.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/plugins/PluginInfo.java b/server/src/main/java/org/opensearch/plugins/PluginInfo.java index cec0b0559ac8c..d39067c976807 100644 --- a/server/src/main/java/org/opensearch/plugins/PluginInfo.java +++ b/server/src/main/java/org/opensearch/plugins/PluginInfo.java @@ -243,7 +243,11 @@ This works for currently supported range notations (=,~) } out.writeStringCollection(extendedPlugins); out.writeBoolean(hasNativeController); - Settings.writeSettingsToStream(requestedActions, out); + if (requestedActions != null) { + Settings.writeSettingsToStream(requestedActions, out); + } else { + Settings.writeSettingsToStream(Settings.EMPTY, out); + } } /**