RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]
XenoAmess
duke at openjdk.java.net
Thu May 26 18:04:58 UTC 2022
On Wed, 25 May 2022 04:50:33 GMT, liach <duke at openjdk.java.net> wrote:
>> XenoAmess has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add test for newHashSet and newLinkedHashSet
>
> test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 354:
>
>> 352: rsc("rsls", size, cap, () -> {
>> 353: try {
>> 354: Field mapField = HashSet.class.getDeclaredField("map");
>
> For clarity, consider using var handle/method handle and keep the reflection code in the `WhiteBoxResizeTest` constructor.
@liach I refactored the tests. please have a look.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8302
More information about the core-libs-dev
mailing list