On Mon, 22 Jun 2026 07:32:00 GMT, Man Cao <[email protected]> wrote: >> Hi all, >> >> Could anyone help review this change that removes the cached static field >> `java.lang.Class.reflectionFactory`? I believe the caching is no longer >> necessary after https://bugs.openjdk.org/browse/JDK-8344011. >> >> This fixes the data race reported in >> https://bugs.openjdk.org/browse/JDK-8386965. It also removes >> `Class.resetArchivedStates()`, which simplifies AOT archive dumping. >> >> -Man >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Man Cao has updated the pull request incrementally with one additional commit > since the last revision: > > Use 'import static'
src/java.base/share/classes/java/lang/Class.java line 96: > 94: import sun.reflect.annotation.*; > 95: > 96: import static jdk.internal.reflect.ReflectionFactory.getReflectionFactory; The changes look okay although I don't particularly like this static import - it's not at all obvious at the usages in Class that it gets it from ReflectionFactory. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31591#discussion_r3450541597
