RFR: 8186958: Need method to create pre-sized HashMap [v18]

Naoto Sato naoto at openjdk.java.net
Wed Apr 13 22:56:31 UTC 2022


On Wed, 13 Apr 2022 22:40:38 GMT, Stuart Marks <smarks at openjdk.org> wrote:

>> XenoAmess has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update LastModified
>
> src/java.base/share/classes/java/lang/Character.java line 8574:
> 
>> 8572:         private static final HashMap<String, Character.UnicodeScript> aliases;
>> 8573:         static {
>> 8574:             aliases = HashMap.newHashMap(162);
> 
> @naotoj Seems like this magic number is likely to go out of date. Should there be a test for it like the one you updated for NUM_ENTITIES? [JDK-8283465](https://bugs.openjdk.java.net/browse/JDK-8283465).

Good point! Filed an issue: https://bugs.openjdk.java.net/browse/JDK-8284856

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

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


More information about the security-dev mailing list