Skip to content

Commit

Permalink
remove unnecessary type cast (apache#7971)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChineseTony authored Mar 28, 2024
1 parent fa811dc commit d2818da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void setUseEpollNativeSelector(boolean useEpollNativeSelector) {

@Override
public Object clone() throws CloneNotSupportedException {
return (NettyServerConfig) super.clone();
return super.clone();
}

public int getWriteBufferLowWaterMark() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,10 @@ public static SendMessageRequestHeader parseRequestHeader(RemotingCommand reques
switch (request.getCode()) {
case RequestCode.SEND_BATCH_MESSAGE:
case RequestCode.SEND_MESSAGE_V2:
requestHeaderV2 =
(SendMessageRequestHeaderV2) request
.decodeCommandCustomHeader(SendMessageRequestHeaderV2.class);
requestHeaderV2 = request.decodeCommandCustomHeader(SendMessageRequestHeaderV2.class);
case RequestCode.SEND_MESSAGE:
if (null == requestHeaderV2) {
requestHeader =
(SendMessageRequestHeader) request
.decodeCommandCustomHeader(SendMessageRequestHeader.class);
requestHeader = request.decodeCommandCustomHeader(SendMessageRequestHeader.class);
} else {
requestHeader = SendMessageRequestHeaderV2.createSendMessageRequestHeaderV1(requestHeaderV2);
}
Expand Down

0 comments on commit d2818da

Please sign in to comment.