RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]
Brent Christian
bchristi at openjdk.org
Wed Apr 9 23:12:01 UTC 2025
On Wed, 9 Apr 2025 22:34:13 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Brent Christian has updated the pull request incrementally with one additional commit since the last revision:
>>
>> only add wFRP to WhiteBox for now
>
> test/lib/jdk/test/whitebox/WhiteBox.java line 574:
>
>> 572: Class refClass = Class.forName("java.lang.ref.Reference");
>> 573: Method[] methods = refClass.getDeclaredMethods();
>> 574: wfrp = Arrays.stream(methods).filter((m) -> m.getName().equals("waitForReferenceProcessing")).findFirst().get();
>
> Use `getDeclaredMethod`, as previously suggested by @RogerRiggs in comment for the copy in ForceGC?
Yep
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24527#discussion_r2036253459
More information about the core-libs-dev
mailing list