Return-Path: X-Original-To: apmail-deltaspike-commits-archive@www.apache.org Delivered-To: apmail-deltaspike-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB1D0173FB for ; Mon, 2 Feb 2015 12:58:46 +0000 (UTC) Received: (qmail 62581 invoked by uid 500); 2 Feb 2015 12:58:47 -0000 Delivered-To: apmail-deltaspike-commits-archive@deltaspike.apache.org Received: (qmail 62545 invoked by uid 500); 2 Feb 2015 12:58:47 -0000 Mailing-List: contact commits-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltaspike.apache.org Delivered-To: mailing list commits@deltaspike.apache.org Received: (qmail 62536 invoked by uid 99); 2 Feb 2015 12:58:47 -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; Mon, 02 Feb 2015 12:58:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 56C56E035D; Mon, 2 Feb 2015 12:58:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: struberg@apache.org To: commits@deltaspike.apache.org Message-Id: <4af2d31bf17b4c64b63b0e7ea2fd77cf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: deltaspike git commit: DELTASPIKE-648 revert to using TCCL as key for the ConfigSources Date: Mon, 2 Feb 2015 12:58:47 +0000 (UTC) Repository: deltaspike Updated Branches: refs/heads/master 48cb0ec8a -> b3bf8516c DELTASPIKE-648 revert to using TCCL as key for the ConfigSources Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/b3bf8516 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/b3bf8516 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/b3bf8516 Branch: refs/heads/master Commit: b3bf8516c515506c9e4b05c2abf1bf114e191f33 Parents: 48cb0ec Author: Mark Struberg Authored: Mon Feb 2 13:30:59 2015 +0100 Committer: Mark Struberg Committed: Mon Feb 2 13:30:59 2015 +0100 ---------------------------------------------------------------------- .../apache/deltaspike/core/api/config/ConfigResolver.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/b3bf8516/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java ---------------------------------------------------------------------- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java index c70557b..b798d46 100644 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/ConfigResolver.java @@ -35,6 +35,7 @@ import org.apache.deltaspike.core.api.projectstage.ProjectStage; import org.apache.deltaspike.core.spi.config.ConfigFilter; import org.apache.deltaspike.core.spi.config.ConfigSource; import org.apache.deltaspike.core.spi.config.ConfigSourceProvider; +import org.apache.deltaspike.core.util.ClassUtils; import org.apache.deltaspike.core.util.ProjectStageProducer; import org.apache.deltaspike.core.util.ServiceUtils; @@ -93,7 +94,7 @@ public final class ConfigResolver getConfigSources(); // and now we can easily add our own - ClassLoader currentClassLoader = ConfigResolver.class.getClassLoader(); + ClassLoader currentClassLoader = ClassUtils.getClassLoader(null); ConfigSource[] configuredConfigSources = configSources.get(currentClassLoader); List allConfigSources = new ArrayList(); @@ -109,7 +110,7 @@ public final class ConfigResolver */ public static synchronized void freeConfigSources() { - configSources.remove(ConfigResolver.class.getClassLoader()); + configSources.remove(ClassUtils.getClassLoader(null)); } /** @@ -129,7 +130,7 @@ public final class ConfigResolver */ public static List getConfigFilters() { - ClassLoader cl = ConfigResolver.class.getClassLoader(); + ClassLoader cl = ClassUtils.getClassLoader(null); List currentConfigFilters = configFilters.get(cl); if (currentConfigFilters == null) { @@ -376,7 +377,7 @@ public final class ConfigResolver private static synchronized ConfigSource[] getConfigSources() { - ClassLoader currentClassLoader = ConfigResolver.class.getClassLoader(); + ClassLoader currentClassLoader = ClassUtils.getClassLoader(null); ConfigSource[] appConfigSources = configSources.get(currentClassLoader);