RFR: 8350983: JShell LocalExecutionControl only needs stopCheck() on backward branches [v2]

Archie Cobbs acobbs at openjdk.org
Mon Mar 3 15:19:22 UTC 2025


On Mon, 3 Mar 2025 04:42:42 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Niceify using pattern matching switch with guard per review suggestion.
>
> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java line 102:
> 
>> 100:                                 return (cob, coe) -> {
>> 101:                                     switch (coe) {
>> 102:                                     case BranchInstruction branch:
> 
> Can we use switch with `->` instead of `:` to avoid the error-prone breaks?

Hi Chen! Excellent suggestion, thanks. Updated in 30c5f1a3c8b.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23850#discussion_r1977699619


More information about the kulla-dev mailing list