Forwarding to the main list, forgot to reply all. On Thu, Aug 14, 2025 at 10:12 PM Chen Liang <liangchenb...@gmail.com> wrote:
> Hello wenshao, I think this is a reasonable enhancement. > > In addition, you can review the switch in jdk.internal.constant as well. I > find there is a traditional switch in ConstantUtils.skipOverFieldSignature > that can be updated too. > > Since enhanced switch statements and expressions can handle > exhaustive switch over enum without default branches, you can consider > remove default branches so we will get compile errors reminding us to > update when we add new method handle kinds. > > Regards, > Chen > > On Thu, Aug 14, 2025 at 9:49 PM wenshao <shaojin.we...@alibaba-inc.com> > 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. >> >> https://github.com/openjdk/jdk/pull/26769 >> >> I have submitted a draft Pull Request and would appreciate some feedback. >> >> - >> Shaojin Wen >> >