sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1651110 - /sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundle.java
Date Mon, 12 Jan 2015 15:05:17 GMT
Author: bdelacretaz
Date: Mon Jan 12 15:05:17 2015
New Revision: 1651110

URL: http://svn.apache.org/r1651110
Log:
SLING-4299 - use LinkedHashSet where order needs to be preserved (test failed under Java 8)

Modified:
    sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundle.java

Modified: sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundle.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundle.java?rev=1651110&r1=1651109&r2=1651110&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundle.java
(original)
+++ sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/JcrResourceBundle.java
Mon Jan 12 15:05:17 2015
@@ -22,8 +22,8 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -67,7 +67,7 @@ public class JcrResourceBundle extends R
 
     private final Locale locale;
 
-    private final Set<String> languageRoots = new HashSet<String>();
+    private final Set<String> languageRoots = new LinkedHashSet<String>();
 
     JcrResourceBundle(Locale locale, String baseName,
             ResourceResolver resourceResolver) {
@@ -218,7 +218,7 @@ public class JcrResourceBundle extends R
         final String localeRFC4646String = toRFC4646String(locale);
         final String localeRFC4646StringLower = localeRFC4646String.toLowerCase();
 
-        Set<String> paths = new HashSet<String>();
+        Set<String> paths = new LinkedHashSet<String>();
         @SuppressWarnings("deprecation")
         Iterator<Resource> bundles = resourceResolver.findResources(QUERY_LANGUAGE_ROOTS,
"xpath");
         while (bundles.hasNext()) {



Mime
View raw message