mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8263561: Re-examine uses of LinkedList
Reviewed-by: redestad
This commit is contained in:
parent
6a3f8343bc
commit
249d641889
9 changed files with 45 additions and 47 deletions
|
@ -2888,7 +2888,7 @@ public abstract class ResourceBundle {
|
|||
if (language.equals("nb") || isNorwegianBokmal) {
|
||||
List<Locale> tmpList = getDefaultList("nb", script, region, variant);
|
||||
// Insert a locale replacing "nb" with "no" for every list entry with precedence
|
||||
List<Locale> bokmalList = new LinkedList<>();
|
||||
List<Locale> bokmalList = new ArrayList<>();
|
||||
for (Locale l_nb : tmpList) {
|
||||
var isRoot = l_nb.getLanguage().isEmpty();
|
||||
var l_no = Locale.getInstance(isRoot ? "" : "no",
|
||||
|
@ -2928,7 +2928,7 @@ public abstract class ResourceBundle {
|
|||
List<String> variants = null;
|
||||
|
||||
if (!variant.isEmpty()) {
|
||||
variants = new LinkedList<>();
|
||||
variants = new ArrayList<>();
|
||||
int idx = variant.length();
|
||||
while (idx != -1) {
|
||||
variants.add(variant.substring(0, idx));
|
||||
|
@ -2936,7 +2936,7 @@ public abstract class ResourceBundle {
|
|||
}
|
||||
}
|
||||
|
||||
List<Locale> list = new LinkedList<>();
|
||||
List<Locale> list = new ArrayList<>();
|
||||
|
||||
if (variants != null) {
|
||||
for (String v : variants) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue