ICU4J block data in UCharacter.java is updated by hand. In 2.8 this data was
inconsistently updated-- the blocks array was shorter than the actual number of
There are three sets of data that should be in synch:
1) the static UnicodeBlock constants, each of which should have the proper name
and block ID,
2) the static int ID constants, each of which should correspond to the id of the
similarly-named UnicodeBlock static,
3) the array of all unicode blocks, which should contain all the UnicodeBlock
static objects in block ID order (such that the block ID and array index are
Also the UnicodeBlock.COUNT value should be equal to the length of the array.
Since this information potentially is updated with each new Unicode version, and
since obviously we have already failed once to correctly update this
information, we should write a test to validate it. Because there are multiple
statics to initialize we can't recode to use an initializer function to do the
bookkeeping for us, we'll have to write a test and use reflection on the
UnicodeBlock object to compare these objects against each other.