Skip to content

Commit

Permalink
Update how empty range list is handled
Browse files Browse the repository at this point in the history
Signed-off-by: Abhilasha Seth <[email protected]>
  • Loading branch information
abseth-amzn committed Mar 7, 2024
1 parent ed67d25 commit 4bd718d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public List<SemverRange> getOpenSearchVersionRanges() {
*/
public String getOpenSearchVersionRangesString() {
if (opensearchVersionRanges == null || opensearchVersionRanges.isEmpty()) {
return "";
throw new IllegalStateException("Opensearch version ranges list cannot be empty");

Check warning on line 448 in server/src/main/java/org/opensearch/plugins/PluginInfo.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/plugins/PluginInfo.java#L448

Added line #L448 was not covered by tests
}
if (opensearchVersionRanges.size() == 1) {
return opensearchVersionRanges.get(0).toString();
Expand Down

0 comments on commit 4bd718d

Please sign in to comment.