On Mon, 4 Oct 2021 13:39:00 GMT, Weijun Wang <[email protected]> wrote:
>> Cleanup unnecessary String.valueOf calls (and similar) when conversion will
>> happen implicitly anyway
>
> src/java.net.http/share/classes/jdk/internal/net/http/Http1AsyncReceiver.java
> line 738:
>
>> 736: if (flowTag != null) {
>> 737: dbgTag = tag = "Http1AsyncReceiver("+ flowTag + ")";
>> 738: } else {
>
> If the only use of `flowTag` is `flow` in string, it looks like `flow` is
> enough. i.e.
>
>
> if (flow != null) {
> dbgTag = tag = "Http1AsyncReceiver("+ flow + ")";
> }
Good idea. Improved.
> src/java.net.http/share/classes/jdk/internal/net/http/Http1Response.java line
> 831:
>
>> 829: @Override
>> 830: public String toString() {
>> 831: return super.toString() + "/parser=" + parser;
>
> Can we use `super` instead of `super.toString()`?
Nope. `super` is not a valid java expression.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5795