jonyangx commented on code in PR #3216:
URL: 
https://github.com/apache/incubator-eventmesh/pull/3216#discussion_r1112488042


##########
eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/demo/CClientDemo.java:
##########
@@ -49,11 +51,10 @@ public static void main(String[] args) throws Exception {
         client.registerSubBusiHandler(new ReceiveMsgHook() {
             @Override
             public void handle(Package msg, ChannelHandlerContext ctx) {
-                if (msg.getHeader().getCmd() == Command.ASYNC_MESSAGE_TO_CLIENT
-                        || msg.getHeader().getCmd() == 
Command.BROADCAST_MESSAGE_TO_CLIENT) {
-
+                if (Objects.equals(msg.getHeader().getCmd(), 
Command.ASYNC_MESSAGE_TO_CLIENT)

Review Comment:
   Therefore we can conclude that when we use == operator for enum member 
comparison then it performs type compatibility check at compile time whereas 
.equals() method will never worry about the types of both the arguments.So 
suggest use == operator.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to