
A TreeSet apparently does not really maintain insertion order, while a LinkedHashSet does. This ensures that the insertion order of locales is preserved in localesToUse so that the prioritization is correct.
A TreeSet apparently does not really maintain insertion order, while a LinkedHashSet does. This ensures that the insertion order of locales is preserved in localesToUse so that the prioritization is correct.