mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8283465: Character.UnicodeBlock.NUM_ENTITIES is out of date
Reviewed-by: bpb, iris, smarks
This commit is contained in:
parent
f9137cb7b7
commit
0ee65e1ff3
3 changed files with 55 additions and 75 deletions
|
@ -737,10 +737,13 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
|||
*/
|
||||
public static final class UnicodeBlock extends Subset {
|
||||
/**
|
||||
* 696 - the expected number of entities
|
||||
* NUM_ENTITIES should match the total number of UnicodeBlocks
|
||||
* to calculate the initial capacity of the map. It should be
|
||||
* adjusted whenever the Unicode Character Database is upgraded.
|
||||
*
|
||||
* 0.75 - the default load factor of HashMap
|
||||
*/
|
||||
private static final int NUM_ENTITIES = 696;
|
||||
private static final int NUM_ENTITIES = 737;
|
||||
private static Map<String, UnicodeBlock> map =
|
||||
new HashMap<>((int)(NUM_ENTITIES / 0.75f + 1.0f));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue