On Wed, 27 May 2026 14:38:44 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). > > Chen Liang has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains five additional commits since > the last revision: > > - Review comments > - Merge branch 'lworld' of https://github.com/openjdk/valhalla into > fix/reflect-factory-strict > - Further cleanup > - Merge branch 'lworld' of https://github.com/openjdk/valhalla into > fix/reflect-factory-strict > - Prevent reflection factory hacking strict init src/java.base/share/classes/jdk/internal/value/ValueClass.java line 169: > 167: /// Returns whether a class or interface declares strict instance > fields. > 168: /// This does not include inherited instance fields. > 169: public static boolean hasStrictInstanceField(Class<?> cl) { Is this intended as a long-term solution? ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2350#discussion_r3355905992
