Add toString method in DefaultHttp2WindowUpdateFrame (#10763)

Motivation:
We should have the `toString` method in `DefaultHttp2WindowUpdateFrame` because it makes debugging a little easy.

Modification:
Added `toString` method.

Result:
`toString` method to help in debugging.


Co-authored-by: Norman Maurer <norman_maurer@apple.com>
This commit is contained in:
Aayush Atharva 2020-11-03 14:07:18 +05:30 committed by GitHub
parent 175d1368e5
commit d1cf9774d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@
*/ */
package io.netty.handler.codec.http2; package io.netty.handler.codec.http2;
import io.netty.util.internal.StringUtil;
import io.netty.util.internal.UnstableApi; import io.netty.util.internal.UnstableApi;
/** /**
@ -44,4 +45,10 @@ public class DefaultHttp2WindowUpdateFrame extends AbstractHttp2StreamFrame impl
public int windowSizeIncrement() { public int windowSizeIncrement() {
return windowUpdateIncrement; return windowUpdateIncrement;
} }
@Override
public String toString() {
return StringUtil.simpleClassName(this) +
"(stream=" + stream() + ", windowUpdateIncrement=" + windowUpdateIncrement + ')';
}
} }