From e4baa6737f0d85a022681b5312d63da4d7b22488 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Tue, 3 Nov 2020 14:07:18 +0530 Subject: [PATCH] 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 --- .../handler/codec/http2/DefaultHttp2WindowUpdateFrame.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2WindowUpdateFrame.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2WindowUpdateFrame.java index 67ee559c57..1c98dd471c 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2WindowUpdateFrame.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2WindowUpdateFrame.java @@ -15,6 +15,7 @@ */ package io.netty.handler.codec.http2; +import io.netty.util.internal.StringUtil; import io.netty.util.internal.UnstableApi; /** @@ -44,4 +45,10 @@ public class DefaultHttp2WindowUpdateFrame extends AbstractHttp2StreamFrame impl public int windowSizeIncrement() { return windowUpdateIncrement; } + + @Override + public String toString() { + return StringUtil.simpleClassName(this) + + "(stream=" + stream() + ", windowUpdateIncrement=" + windowUpdateIncrement + ')'; + } }