On Tue, 21 Apr 2026 18:02:28 GMT, Chen Liang <[email protected]> wrote:
> ReflectionFactory.newConstructorForSerializatoin might bypass strict > initialization. We should make sure the skipped classes in the constructor > chain do not declare strict instance fields. > > This updates the specification of jdk.unsupported's ReflectionFactory to > reflect this behavioral update. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). src/java.base/share/classes/jdk/internal/value/ValueClass.java line 156: > 154: // Not class or interface > 155: return false; > 156: } Might be better to put this check in `public static boolean hasStrictInstanceField(Class<?> cl)` so the cheap check doesn't need to populate the ClassValue at all. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2350#discussion_r3297201120
