jonyangx commented on code in PR #2818:
URL:
https://github.com/apache/incubator-eventmesh/pull/2818#discussion_r1061471305
##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/rebalance/EventmeshRebalanceImpl.java:
##########
@@ -62,7 +62,7 @@ public void doRebalance() throws Exception {
final String cluster =
eventMeshTCPServer.getEventMeshTCPConfiguration().getEventMeshCluster();
//get eventmesh of local idc
Map<String, String> localEventMeshMap =
queryLocalEventMeshMap(cluster);
- if (localEventMeshMap == null || localEventMeshMap.size() == 0) {
+ if (localEventMeshMap == null || localEventMeshMap.isEmpty()) {
Review Comment:
use
MapUtils.isEmpty()(https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/MapUtils.html)
is better.
--
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]