You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2018/03/07 12:10:36 UTC
[1/2] deltaspike git commit: DELTASPIKE-1322 getPropertyValue is
without ProjectStage
Repository: deltaspike
Updated Branches:
refs/heads/master be87972d5 -> 8242a4c17
DELTASPIKE-1322 getPropertyValue is without ProjectStage
Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/7ee3a1ea
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/7ee3a1ea
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/7ee3a1ea
Branch: refs/heads/master
Commit: 7ee3a1eae7e4da72b41078bfd768fe3010d1e80b
Parents: be87972
Author: Mark Struberg <st...@apache.org>
Authored: Wed Mar 7 11:30:24 2018 +0100
Committer: Mark Struberg <st...@apache.org>
Committed: Wed Mar 7 11:30:24 2018 +0100
----------------------------------------------------------------------
.../java/org/apache/deltaspike/core/api/config/ConfigResolver.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7ee3a1ea/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 8a5dbe9..b2541ac 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
@@ -154,6 +154,7 @@ public final class ConfigResolver
return getConfigProvider().getConfig().resolve(key)
.withDefault(defaultValue)
.evaluateVariables(evaluateVariables)
+ .withCurrentProjectStage(false)
.getValue();
}
[2/2] deltaspike git commit: DELTASPIKE-1322 there is no need to sort
Posted by st...@apache.org.
DELTASPIKE-1322 there is no need to sort
Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/8242a4c1
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/8242a4c1
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/8242a4c1
Branch: refs/heads/master
Commit: 8242a4c178a5a723de6841258607ac2bb69eff67
Parents: 7ee3a1e
Author: Mark Struberg <st...@apache.org>
Authored: Wed Mar 7 13:09:54 2018 +0100
Committer: Mark Struberg <st...@apache.org>
Committed: Wed Mar 7 13:09:54 2018 +0100
----------------------------------------------------------------------
.../core/api/config/ConfigResolver.java | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8242a4c1/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 b2541ac..23cdd2f 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
@@ -20,7 +20,6 @@ package org.apache.deltaspike.core.api.config;
import java.lang.reflect.Type;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
@@ -320,14 +319,11 @@ public final class ConfigResolver
*/
public static List<String> getAllPropertyValues(String key)
{
- // must use a new list because Arrays.asList() is resistant to sorting on some JVMs:
- List<ConfigSource> appConfigSources = sortAscending(new ArrayList<ConfigSource>(
- Arrays.<ConfigSource> asList(getConfigSources())));
+ ConfigSource[] configSources = getConfigProvider().getConfig().getConfigSources();
List<String> result = new ArrayList<String>();
-
- for (ConfigSource configSource : appConfigSources)
+ for (int i = configSources.length; i > 0; i--)
{
- String value = configSource.getPropertyValue(key);
+ String value = configSources[i - 1].getPropertyValue(key);
if (value != null)
{
@@ -340,6 +336,7 @@ public final class ConfigResolver
}
return result;
+
}
/**
@@ -351,13 +348,13 @@ public final class ConfigResolver
*/
public static Map<String, String> getAllProperties()
{
- // must use a new list because Arrays.asList() is resistant to sorting on some JVMs:
- List<ConfigSource> appConfigSources = sortAscending(new ArrayList<>(
- Arrays.asList(getConfigSources())));
+ ConfigSource[] configSources = getConfigProvider().getConfig().getConfigSources();
Map<String, String> result = new HashMap<String, String>();
- for (ConfigSource configSource : appConfigSources)
+ for (int i = configSources.length; i > 0; i--)
{
+ ConfigSource configSource = configSources[i - 1];
+
if (configSource.isScannable())
{
result.putAll(configSource.getProperties());