[code-reflection] RFR: Update ReflectMethods.BodyScanner.coerce to handle null targetType

Mourad Abbay mabbay at openjdk.org
Fri Aug 29 23:45:02 UTC 2025


`ReflectMethods.BodyScanner.coerce` wasn't handling `null` targetType. For example, a `null` targetType may propagate to reach the method `coerce` when visiting case body of switch statement.

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

Commit messages:
 - Update ReflectMethods.BodyScanner.coerce to handle null targetType

Changes: https://git.openjdk.org/babylon/pull/536/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=536&range=00
  Stats: 33 lines in 2 files changed: 29 ins; 2 del; 2 mod
  Patch: https://git.openjdk.org/babylon/pull/536.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/536/head:pull/536

PR: https://git.openjdk.org/babylon/pull/536


More information about the babylon-dev mailing list