Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
Bughue committed Nov 18, 2024
1 parent b1af528 commit c57ffb1
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,19 @@
import org.apache.seata.core.protocol.MessageTypeAware;
import org.apache.seata.core.protocol.RpcMessage;
import org.apache.seata.core.protocol.Version;
import org.apache.seata.core.rpc.netty.ChannelManager;

import java.util.Arrays;
import java.util.List;

/**
* the type ServerSkipMsgHelper
*
**/
public class MsgVersionHelper {

private static final List<Short> SKIP_MSG_CODE_V0 = Arrays.asList(MessageType.TYPE_RM_DELETE_UNDOLOG);

public static boolean versionNotSupport(Channel channel, RpcMessage rpcMessage){
if(rpcMessage==null || rpcMessage.getBody() == null || channel == null){
public static boolean versionNotSupport(Channel channel, RpcMessage rpcMessage) {
if (rpcMessage == null || rpcMessage.getBody() == null || channel == null) {
return false;
}
Object msg = rpcMessage.getBody();
Expand All @@ -45,7 +43,7 @@ public static boolean versionNotSupport(Channel channel, RpcMessage rpcMessage){
return false;
}
boolean aboveV0 = Version.isAboveOrEqualVersion071(version);
if(aboveV0 || !(msg instanceof MessageTypeAware)){
if (aboveV0 || !(msg instanceof MessageTypeAware)) {
return false;
}
short typeCode = ((MessageTypeAware) msg).getTypeCode();
Expand Down

0 comments on commit c57ffb1

Please sign in to comment.