--- old/test/jdk/java/lang/Character/UnicodeBlock/OptimalMapSize.java 2019-05-22 15:33:27.000000000 -0700 +++ new/test/jdk/java/lang/Character/UnicodeBlock/OptimalMapSize.java 2019-05-22 15:33:26.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /** * @test - * @bug 8080535 8191410 8215194 + * @bug 8080535 8191410 8215194 8221431 * @summary Expected size of Character.UnicodeBlock.map is not optimal * @library /test/lib * @modules java.base/java.lang:open @@ -46,13 +46,14 @@ // be 638 entries in Character.UnicodeBlock.map. // // As of Unicode 11, 667 entries are expected. +// As of Unicode 12.1, 676 entries are expected. // // Initialization of the map and this test will have to be adjusted // accordingly then. // // Note that HashMap's implementation aligns the initial capacity to // a power of two size, so it will end up 1024 (and thus succeed) in -// cases, such as 638 and 667. +// cases, such as 638, 667, and 676. public class OptimalMapSize { public static void main(String[] args) throws Throwable { @@ -61,7 +62,7 @@ Field f = Character.UnicodeBlock.class.getDeclaredField("NUM_ENTITIES"); f.setAccessible(true); int num_entities = f.getInt(null); - assert num_entities == 667; + assert num_entities == 676; int initialCapacity = (int)(num_entities / 0.75f + 1.0f); OptimalCapacity.ofHashMap(Character.UnicodeBlock.class,