ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [19/50] [abbrv] incubator-ignite git commit: # ignite-707
Date Fri, 10 Apr 2015 07:59:51 GMT
# ignite-707


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5d1815ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5d1815ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5d1815ef

Branch: refs/heads/ignite-625-1
Commit: 5d1815ef5eb2b0dbb929136823fbc424bc9b094c
Parents: 2412422
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Apr 9 13:15:41 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Apr 9 13:15:41 2015 +0300

----------------------------------------------------------------------
 .../processors/plugin/IgnitePluginProcessor.java    | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5d1815ef/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index 8d71ad7..0b9ca5e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -27,6 +27,7 @@ import org.apache.ignite.plugin.*;
 import org.jetbrains.annotations.*;
 
 import java.lang.reflect.*;
+import java.security.*;
 import java.util.*;
 
 /**
@@ -53,9 +54,20 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
 
         ExtensionRegistryImpl registry = new ExtensionRegistryImpl();
 
-        ServiceLoader<PluginProvider> ldr = ServiceLoader.load(PluginProvider.class);
+        List<PluginProvider> providers = AccessController.doPrivileged(new PrivilegedAction<List<PluginProvider>>()
{
+            @Override public List<PluginProvider> run() {
+                List<PluginProvider> providers = new ArrayList<>();
 
-        for (PluginProvider provider : ldr) {
+                ServiceLoader<PluginProvider> ldr = ServiceLoader.load(PluginProvider.class);
+
+                for (PluginProvider provider : ldr)
+                    providers.add(provider);
+
+                return providers;
+            }
+        });
+
+        for (PluginProvider provider : providers) {
             GridPluginContext pluginCtx = new GridPluginContext(ctx, cfg);
 
             if (F.isEmpty(provider.name()))


Mime
View raw message