On Tue, 21 May 2024 13:49:18 GMT, jengebr <d...@openjdk.org> wrote: > Improve `java/lang/reflect/Method.java` by eliminating needless cloning of > Class[0] instances. This cloning is intended to prevent callers from > changing array contents, but smany Methods have zero exceptions or zero > parameters, and returning the original `Class[0]` is sufficient.
This looks fine to me. Since this is a first-time contribution, someone else needs to take a look as well. You may want to put a simple microbenchmark somewhere here: https://github.com/openjdk/jdk/tree/master/test/micro/org/openjdk/bench/java/lang/reflect ------------- Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19327#pullrequestreview-2089223720