Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28CA9102D2 for ; Fri, 10 Apr 2015 01:02:06 +0000 (UTC) Received: (qmail 96009 invoked by uid 500); 10 Apr 2015 01:02:03 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 95976 invoked by uid 500); 10 Apr 2015 01:02:03 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 95924 invoked by uid 99); 10 Apr 2015 01:02:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2015 01:02:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 10 Apr 2015 01:02:01 +0000 Received: (qmail 95812 invoked by uid 99); 10 Apr 2015 01:01:41 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2015 01:01:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B6380E01FB; Fri, 10 Apr 2015 01:01:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agoncharuk@apache.org To: commits@ignite.incubator.apache.org Date: Fri, 10 Apr 2015 01:01:46 -0000 Message-Id: <1ec8673aed024860b2f22ee542892e6d@git.apache.org> In-Reply-To: <9f86ac11e70a466cbc7aaa21efadfda0@git.apache.org> References: <9f86ac11e70a466cbc7aaa21efadfda0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [06/23] incubator-ignite git commit: # ignite-707 X-Virus-Checked: Checked by ClamAV on apache.org # 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-80 Commit: 5d1815ef5eb2b0dbb929136823fbc424bc9b094c Parents: 2412422 Author: sboikov Authored: Thu Apr 9 13:15:41 2015 +0300 Committer: sboikov 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 ldr = ServiceLoader.load(PluginProvider.class); + List providers = AccessController.doPrivileged(new PrivilegedAction>() { + @Override public List run() { + List providers = new ArrayList<>(); - for (PluginProvider provider : ldr) { + ServiceLoader 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()))