deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject deltaspike git commit: DELTASPIKE-648 revert to using TCCL as key for the ConfigSources
Date Mon, 02 Feb 2015 12:58:47 GMT
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 <struberg@apache.org>
Authored: Mon Feb 2 13:30:59 2015 +0100
Committer: Mark Struberg <struberg@apache.org>
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<ConfigSource> allConfigSources = new ArrayList<ConfigSource>();
@@ -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<ConfigFilter> getConfigFilters()
     {
-        ClassLoader cl = ConfigResolver.class.getClassLoader();
+        ClassLoader cl = ClassUtils.getClassLoader(null);
         List<ConfigFilter> 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);
 


Mime
View raw message