mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8215194: Initial size of UnicodeBlock map is incorrect
Reviewed-by: rriggs, rgoel, igerasim
This commit is contained in:
parent
7cea6f6ac2
commit
c2364ff9e0
2 changed files with 16 additions and 4 deletions
|
@ -681,11 +681,12 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
|||
*/
|
||||
public static final class UnicodeBlock extends Subset {
|
||||
/**
|
||||
* 649 - the expected number of entities
|
||||
* 667 - the expected number of entities
|
||||
* 0.75 - the default load factor of HashMap
|
||||
*/
|
||||
private static final int NUM_ENTITIES = 667;
|
||||
private static Map<String, UnicodeBlock> map =
|
||||
new HashMap<>((int)(649 / 0.75f + 1.0f));
|
||||
new HashMap<>((int)(NUM_ENTITIES / 0.75f + 1.0f));
|
||||
|
||||
/**
|
||||
* Creates a UnicodeBlock with the given identifier name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue