<div dir="ltr">Forwarding to the main list, forgot to reply all.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Aug 14, 2025 at 10:12 PM Chen Liang <<a href="mailto:liangchenblue@gmail.com">liangchenblue@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello wenshao, I think this is a reasonable enhancement.<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Regards,</div><div>Chen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 14, 2025 at 9:49 PM wenshao <<a href="mailto:shaojin.wensj@alibaba-inc.com" target="_blank">shaojin.wensj@alibaba-inc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Tahoma,Arial,STHeitiSC-Light,SimSun"><div style="clear:both"><span>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.</span></div><div style="clear:both"><span><br></span></div><div style="clear:both"><span><span><a href="https://github.com/openjdk/jdk/pull/26769" target="_blank">https://github.com/openjdk/jdk/pull/26769</a></span></span></div><div style="clear:both"><span><br></span></div><div style="clear:both"><span><span>I have submitted a draft Pull Request and would appreciate some feedback.</span></span></div><div style="clear:both"><span><span><br></span></span></div><div style="clear:both"><span>-</span></div><div style="clear:both"><span>Shaojin Wen</span></div></div></div></blockquote></div>
</blockquote></div>