Integrated: 8285401: Proxy class initializer should use 3-arg `Class.forName` to avoid unnecessary class initialization
liach
duke at openjdk.java.net
Tue May 31 18:34:44 UTC 2022
On Fri, 20 May 2022 03:50:58 GMT, liach <duke at openjdk.java.net> wrote:
> Simplify calls `Class.forName(String, boolean, ClassLoader)` instead of `Class.forName(String)`. `make test TEST="jtreg:test/jdk/java/lang/reflect/Proxy"` passes, with the new `LazyInitializationTest` failing the eager initialization check on the baseline and passing with this patch.
>
> On a side note, this might reduce the number of methods that can be encoded in a proxy due to code attribute size restrictions; we probably would address that in another issue, as we never mandated a count of methods that the proxy must be able to implement.
>
> Mandy, would you mind review this?
This pull request has now been integrated.
Changeset: e0382c55
Author: liach <liach at users.noreply.github.com>
Committer: Roger Riggs <rriggs at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/e0382c552348d108e906792ad8ca7067f9f805ec
Stats: 76 lines in 2 files changed: 72 ins; 0 del; 4 mod
8285401: Proxy class initializer should use 3-arg `Class.forName` to avoid unnecessary class initialization
Reviewed-by: rriggs, mchung
-------------
PR: https://git.openjdk.java.net/jdk/pull/8800
More information about the core-libs-dev
mailing list