RFR: 8365620: Using enhanced switch in MethodHandleDesc
Chen Liang
liach at openjdk.org
Sun Aug 31 03:27:58 UTC 2025
On Thu, 14 Aug 2025 04:49:28 GMT, Shaojin Wen <swen at openjdk.org> wrote:
> In MethodHandleDesc, the `ofField` method uses enhanced switch, while the `of` and `ofMethod` methods use traditional switch. The same class should have a unified style.
Hi @davidalayachew, I think what @wenshao tries to do here is to preserve behavioral parity before and after the migrations. You are indeed correct that listing the constants explicitly would allow us to fail with a compile error when we add new constants.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26769#issuecomment-3239715196
More information about the core-libs-dev
mailing list