8288628: Unnecessary Hashtable usage in ConditionalSpecialCasing

Reviewed-by: naoto, jpai
This commit is contained in:
Andrey Turbanov 2022-06-21 08:28:04 +00:00
parent 701ea3beaa
commit 0f801fe6fd

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,8 +26,8 @@
package java.lang; package java.lang;
import java.text.BreakIterator; import java.text.BreakIterator;
import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator; import java.util.Iterator;
import java.util.Locale; import java.util.Locale;
import sun.text.Normalizer; import sun.text.Normalizer;
@ -89,7 +89,7 @@ final class ConditionalSpecialCasing {
}; };
// A hash table that contains the above entries // A hash table that contains the above entries
static Hashtable<Integer, HashSet<Entry>> entryTable = new Hashtable<>(); private static final HashMap<Integer, HashSet<Entry>> entryTable = new HashMap<>();
static { static {
// create hashtable from the entry // create hashtable from the entry
for (Entry cur : entry) { for (Entry cur : entry) {