Skip to content

Commit 0032cc3

Browse files
committed
Only send plugin names when serializing PluginInfo
Signed-off-by: Craig Perkins <cwperx@amazon.com>
1 parent 7e75335 commit 0032cc3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ This works for currently supported range notations (=,~)
232232
} else {
233233
out.writeString(name);
234234
}
235-
out.writeStringCollection(extendedPlugins);
235+
out.writeStringCollection(getExtendedPluginNames());
236236
out.writeBoolean(hasNativeController);
237237
}
238238

@@ -417,6 +417,15 @@ public String getFolderName() {
417417
*
418418
* @return the names of the plugins extended
419419
*/
420+
public List<String> getExtendedPluginNames() {
421+
return extendedPlugins.stream().map(s -> s.split(";")[0]).collect(Collectors.toUnmodifiableList());
422+
}
423+
424+
/**
425+
* Other plugins this plugin extends through SPI including information about optionality.
426+
*
427+
* @return the names of the plugins extended including optionality. i.e. opensearch-job-scheduler;optional=true
428+
*/
420429
public List<String> getExtendedPlugins() {
421430
return extendedPlugins;
422431
}

0 commit comments

Comments
 (0)