Remove dead code in Http2CodecUtil (#8009)
Motivation: The `ByteBuffer emptyPingBuf()` method of Http2CodecUtils is has been dead code since DefaultHttp2PingFrame switched from using a ByteBuf to represent the 8 octets to a long. Modifications: Remove the method and the unused static ByteBuf. Result: Less dead code. Fixes #8002
This commit is contained in:
parent
b192bf12ad
commit
abe77511b9
@ -67,9 +67,6 @@ public final class Http2CodecUtil {
|
||||
private static final ByteBuf CONNECTION_PREFACE =
|
||||
unreleasableBuffer(directBuffer(24).writeBytes("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(UTF_8)))
|
||||
.asReadOnly();
|
||||
private static final ByteBuf EMPTY_PING =
|
||||
unreleasableBuffer(directBuffer(PING_FRAME_PAYLOAD_LENGTH).writeZero(PING_FRAME_PAYLOAD_LENGTH))
|
||||
.asReadOnly();
|
||||
|
||||
private static final int MAX_PADDING_LENGTH_LENGTH = 1;
|
||||
public static final int DATA_FRAME_HEADER_LENGTH = FRAME_HEADER_LENGTH + MAX_PADDING_LENGTH_LENGTH;
|
||||
@ -169,14 +166,6 @@ public final class Http2CodecUtil {
|
||||
return CONNECTION_PREFACE.retainedDuplicate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a buffer filled with all zeros that is the appropriate length for a PING frame.
|
||||
*/
|
||||
public static ByteBuf emptyPingBuf() {
|
||||
// Return a duplicate so that modifications to the reader index will not affect the original buffer.
|
||||
return EMPTY_PING.retainedDuplicate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Iteratively looks through the causality chain for the given exception and returns the first
|
||||
* {@link Http2Exception} or {@code null} if none.
|
||||
|
Loading…
Reference in New Issue
Block a user