On Tue, 21 Jul 2026 16:05:11 GMT, Jaikiran Pai <[email protected]> wrote:
> Can I please get a review of this change which proposes to address the issue > noted in https://bugs.openjdk.org/browse/JDK-8388553? > > `java.lang.reflect.ProxyGenerator`, a JDK internal class that relates to > `java.lang.reflect.Proxy` API, has an (undocumented internal) system property > which can be set to `true` to write out the bytes of the `Proxy` class > generated dynamically by this code. Before Java 24, when SecurityManager was > around, this code of writing out to a file, was wrapped in a > `PrivilegedAction`. When we updated this code during the removal of > SecurityManager in https://bugs.openjdk.org/browse/JDK-8344011, we > accidentally returned `null` from the `if` block after writing out the class > bytes. This effectively results in the > `ProxyGenerator.generateProxyClass(...)` method returning null for any > `Proxy` class it generates when that internal system property is set to true. > > The commit in this PR fixes that oversight. The pre-existing > `test/jdk/java/lang/reflect/Proxy/Basic1.java` jtreg test has been updated to > have a `@run` with this system property value set to `true`. The test fails > (as expected) without the proposed source fix and passes (as expected) with > it. > > tier testing is currently in progress but I don't expect any surprises there. > Tomorrow I will go through the original commit of JDK-8344011 just to check > if there are any other places that might need attention. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Thank you Alan and Chen for the reviews. > tier testing is currently in progress but I don't expect any surprises there. Tier testing completed without any related issues. > Tomorrow I will go through the original commit of JDK-8344011 just to check > if there are any other places that might need attention. I have taken another look at that integrated change and I haven't spotted anything else that requires attention. ------------- PR Comment: https://git.openjdk.org/jdk/pull/31993#issuecomment-5043169740
