On Tue, 8 Apr 2025 21:16:22 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> reflection improvements > > test/lib/jdk/test/lib/util/ForceGC.java line 125: > >> 123: Method[] methods = refClass.getDeclaredMethods(); >> 124: wfrp = Arrays.stream(methods).filter((m) -> >> m.getName().equals("waitForReferenceProcessing")).findFirst().get(); >> 125: wfrp.setAccessible(true); > > You don't need the stream. > Suggestion: > > Method wfrp = > Reference.class.getDeclaredMethod("waitForReferenceProcessing"); > wfrp.setAccessible(true); Yes, that is better, thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24527#discussion_r2036252717