Skip to content

Commit

Permalink
Single call to loadExtensions
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Jan 21, 2025
1 parent df48c29 commit a4937bd
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public PluginsService(
logger.error("Failed to load classpath plugin: " + pluginInfo.getClassname());

Check warning on line 192 in server/src/main/java/org/opensearch/plugins/PluginsService.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/plugins/PluginsService.java#L191-L192

Added lines #L191 - L192 were not covered by tests
}
}
loadExtensions(pluginsLoaded);

Set<Bundle> seenBundles = new LinkedHashSet<>();
List<PluginInfo> modulesList = new ArrayList<>();
Expand Down Expand Up @@ -229,6 +228,7 @@ public PluginsService(

List<Tuple<PluginInfo, Plugin>> loaded = loadBundles(seenBundles);
pluginsLoaded.addAll(loaded);
loadExtensions(pluginsLoaded);

this.info = new PluginsAndModules(pluginsList, modulesList);
this.plugins = Collections.unmodifiableList(pluginsLoaded);
Expand Down Expand Up @@ -585,7 +585,6 @@ private List<Tuple<PluginInfo, Plugin>> loadBundles(Set<Bundle> bundles) {
plugins.add(new Tuple<>(bundle.plugin, plugin));
}

loadExtensions(plugins);
return Collections.unmodifiableList(plugins);
}

Expand Down

0 comments on commit a4937bd

Please sign in to comment.