From 4bd718d0d6f991ec720e87f78b56aa3100e86989 Mon Sep 17 00:00:00 2001 From: Abhilasha Seth Date: Thu, 7 Mar 2024 05:35:38 +0000 Subject: [PATCH] Update how empty range list is handled Signed-off-by: Abhilasha Seth --- server/src/main/java/org/opensearch/plugins/PluginInfo.java | 2 +- 1 file changed, 1 insertion(+), 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 24b7427203f5b..b6030f4ded5e5 100644 --- a/server/src/main/java/org/opensearch/plugins/PluginInfo.java +++ b/server/src/main/java/org/opensearch/plugins/PluginInfo.java @@ -445,7 +445,7 @@ public List getOpenSearchVersionRanges() { */ public String getOpenSearchVersionRangesString() { if (opensearchVersionRanges == null || opensearchVersionRanges.isEmpty()) { - return ""; + throw new IllegalStateException("Opensearch version ranges list cannot be empty"); } if (opensearchVersionRanges.size() == 1) { return opensearchVersionRanges.get(0).toString();