Skip to content

Commit

Permalink
IGNITE-20744 StandaloneContext should not load plugins from classpath (
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-vinogradov authored Oct 27, 2023
1 parent 79b9a47 commit 7c11d93
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ public void start(
throw new IgniteCheckedException("User attribute has illegal name: '" + name + "'. Note that all names " +
"starting with '" + ATTR_PREFIX + "' are reserved for internal use.");

List<PluginProvider> plugins = U.allPluginProviders(cfg);
List<PluginProvider> plugins = U.allPluginProviders(cfg, true);

// Spin out SPIs & managers.
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ class StandaloneIgnitePluginProcessor extends IgnitePluginProcessor {
* @param cfg Ignite configuration.
*/
StandaloneIgnitePluginProcessor(GridKernalContext ctx, IgniteConfiguration cfg) throws IgniteCheckedException {
super(ctx, cfg, U.allPluginProviders(cfg));
super(ctx, cfg, U.allPluginProviders(cfg, false));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,15 @@ public static List<PluginProvider> allPluginProviders() {
* Gets all plugin providers.
*
* @param cfg Configuration.
* @param includeClsPath Include classpath plugins on empty config.
* @return Plugins.
*/
public static List<PluginProvider> allPluginProviders(IgniteConfiguration cfg) {
public static List<PluginProvider> allPluginProviders(IgniteConfiguration cfg, boolean includeClsPath) {
return cfg.getPluginProviders() != null && cfg.getPluginProviders().length > 0 ?
Arrays.asList(cfg.getPluginProviders()) : U.allPluginProviders();
Arrays.asList(cfg.getPluginProviders()) :
includeClsPath ?
U.allPluginProviders() :
Collections.emptyList();
}

/**
Expand Down

0 comments on commit 7c11d93

Please sign in to comment.