mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8081027: Create a common test to check adequacy of initial size of static HashMap/ArrayList fields
Reviewed-by: martin
This commit is contained in:
parent
5fe4d18385
commit
97f5b473ec
8 changed files with 361 additions and 79 deletions
|
@ -646,13 +646,11 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
|||
*/
|
||||
public static final class UnicodeBlock extends Subset {
|
||||
/**
|
||||
* 510 - the expected number of enteties
|
||||
* 510 - the expected number of entities
|
||||
* 0.75 - the default load factor of HashMap
|
||||
*/
|
||||
private static final int INITIAL_CAPACITY =
|
||||
(int)(510 / 0.75f + 1.0f);
|
||||
private static Map<String, UnicodeBlock> map =
|
||||
new HashMap<>(INITIAL_CAPACITY);
|
||||
new HashMap<>((int)(510 / 0.75f + 1.0f));
|
||||
|
||||
/**
|
||||
* Creates a UnicodeBlock with the given identifier name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue