deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject git commit: DELTASPIKE-743 restore functionality that fails on some JVMs
Date Thu, 16 Oct 2014 16:49:17 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 4d0d89836 -> 129d30627


DELTASPIKE-743 restore functionality that fails on some JVMs


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/129d3062
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/129d3062
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/129d3062

Branch: refs/heads/master
Commit: 129d30627f0c8cbeef2ad6727a75cacf78441418
Parents: 4d0d898
Author: mbenson <mbenson@apache.org>
Authored: Thu Oct 16 11:47:25 2014 -0500
Committer: mbenson <mbenson@apache.org>
Committed: Thu Oct 16 11:48:55 2014 -0500

----------------------------------------------------------------------
 .../apache/deltaspike/core/api/config/ConfigResolver.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/129d3062/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 80ea0a5..ae37147 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
@@ -301,7 +301,9 @@ public final class ConfigResolver
      */
     public static List<String> getAllPropertyValues(String key)
     {
-        List<ConfigSource> appConfigSources = sortAscending(Arrays.<ConfigSource>
asList(getConfigSources()));
+        // 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())));
         List<String> result = new ArrayList<String>();
 
         for (ConfigSource configSource : appConfigSources)
@@ -323,7 +325,9 @@ public final class ConfigResolver
 
     public static Map<String, String> getAllProperties()
     {
-        List<ConfigSource> appConfigSources = sortAscending(Arrays.<ConfigSource>
asList(getConfigSources()));
+        // 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())));
         Map<String, String> result = new HashMap<String, String>();
 
         for (ConfigSource configSource : appConfigSources)


Mime
View raw message