On Tue, 22 Mar 2022 18:44:09 GMT, Naoto Sato <na...@openjdk.org> wrote:

> Fixing the out-of-date number of entries in 
> `Character.UnicodeBlock.NUM_ENTITIES` field. The regression test has been 
> renamed and now repurposed just to examine whether the `NUM_ENTITIES` 
> correctly has the `map.size()` value.

Thanks for doing this! I was going to offer to do this myself but you beat me 
to it. Rewritten test looks great.

src/java.base/share/classes/java/lang/Character.java line 740:

> 738:     public static final class UnicodeBlock extends Subset {
> 739:         /**
> 740:          * 737 - the expected number of entities

Just a quibble about this comment... it's probably not worth repeating the 
actual value. But it probably is worth mentioning that the actual value should 
(or must) match the number of entries added to the map by constructors called 
from the static initializers in this class. Whenever aliases or new blocks are 
added, this number must be adjusted.

-------------

Marked as reviewed by smarks (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7909

Reply via email to