RFR: 8310849: Pattern matching for instanceof and arrayType cleanup in j.l.invoke and j.l.reflect

Chen Liang liach at openjdk.org
Sun Jun 25 09:26:23 UTC 2023


This patch touches java.lang.reflect and java.lang.invoke packages. It replaces instanceof + cast with pattern matching and updates  Array.newInstance().getClass() patterns with arrayType() for obtaining array types of a class.

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

Commit messages:
 - 8310849: Pattern matching for instanceof and arrayType cleanup in j.l.invoke and j.l.reflect

Changes: https://git.openjdk.org/jdk/pull/14642/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14642&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8310849
  Stats: 210 lines in 34 files changed: 0 ins; 19 del; 191 mod
  Patch: https://git.openjdk.org/jdk/pull/14642.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14642/head:pull/14642

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


More information about the core-libs-dev mailing list