On Wed, 2 Dec 2020 09:42:09 GMT, Kartik Ohri
<[email protected]> wrote:
>> Hi!
>> Kindly review this patch to replace switch statements with switch
>> expressions (where it makes sense) in the http client modules. The rationale
>> is to improve readability of the code.
>> Regards,
>> Kartik
>
> Kartik Ohri has refreshed the contents of this pull request, and previous
> commits have been removed. The incremental views will show differences
> compared to the previous content of the PR.
src/java.net.http/share/classes/jdk/internal/net/http/Http1HeaderParser.java
line 119:
> 117: while (canContinueParsing(input)) {
> 118: switch (state) {
> 119: case INITIAL ->
> state = State.STATUS_LINE;
Looks good. Although, I think you can improve it further if you align the
lambda operators as well
-------------
PR: https://git.openjdk.java.net/jdk/pull/1364