RFR: 8332586: Avoid cloning empty arrays in java.lang.reflect.{Method,Constructor} [v3]

jengebr duke at openjdk.org
Fri May 31 16:53:36 UTC 2024


> 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.

jengebr has updated the pull request incrementally with one additional commit since the last revision:

  Correcting and renaming benchmark

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/19327/files
  - new: https://git.openjdk.org/jdk/pull/19327/files/4865dede..31b64951

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19327&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19327&range=01-02

  Stats: 145 lines in 2 files changed: 63 ins; 82 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19327.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19327/head:pull/19327

PR: https://git.openjdk.org/jdk/pull/19327


More information about the core-libs-dev mailing list