On Fri, 15 Apr 2022 21:15:45 GMT, Paul Sandoz <psan...@openjdk.org> wrote:

>> Alan Bateman has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Refresh
>
> src/java.base/share/classes/jdk/internal/vm/Continuation.java line 94:
> 
>> 92:             default:
>> 93:                 throw new AssertionError("Unknown pinned reason: " + 
>> reason);
>> 94:         }
> 
> Suggestion:
> 
>         return switch (reason) {
>             case 2 -> Pinned.CRITICAL_SECTION;
>             case 3 -> Pinned.NATIVE;
>             case 4 -> Pinned.MONITOR;
>             default -> throw new AssertionError("Unknown pinned reason: " + 
> reason);
>         };

That would be clearer (I think this predates switch expressions).

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

PR: https://git.openjdk.java.net/jdk/pull/8166

Reply via email to