Skip to content

Commit

Permalink
Only send plugin names when serializing PluginInfo
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Jan 3, 2025
1 parent 7e75335 commit 0032cc3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server/src/main/java/org/opensearch/plugins/PluginInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ This works for currently supported range notations (=,~)
} else {
out.writeString(name);
}
out.writeStringCollection(extendedPlugins);
out.writeStringCollection(getExtendedPluginNames());
out.writeBoolean(hasNativeController);
}

Expand Down Expand Up @@ -417,6 +417,15 @@ public String getFolderName() {
*
* @return the names of the plugins extended
*/
public List<String> getExtendedPluginNames() {
return extendedPlugins.stream().map(s -> s.split(";")[0]).collect(Collectors.toUnmodifiableList());
}

/**
* Other plugins this plugin extends through SPI including information about optionality.
*
* @return the names of the plugins extended including optionality. i.e. opensearch-job-scheduler;optional=true
*/
public List<String> getExtendedPlugins() {
return extendedPlugins;
}
Expand Down

0 comments on commit 0032cc3

Please sign in to comment.