【fix sonar】VXESocket文件

This commit is contained in:
梁琦涛
2023-03-09 09:34:38 +08:00
parent 151e8579af
commit 496e89aea1
@@ -93,7 +93,7 @@ public class VXESocket {
*/
public static void sendMessageTo(String userId, String message) {
Collection<VXESocket> values = getUserPool(userId).values();
if (values.size() > 0) {
if (!values.isEmpty()) {
for (VXESocket socketItem : values) {
socketItem.sendMessage(message);
}
@@ -156,6 +156,7 @@ public class VXESocket {
log.info("【vxeSocket】有新的连接,总数为:" + socketPool.size());
} catch (Exception ignored) {
log.error("异常",ignored);
}
}
@@ -170,6 +171,7 @@ public class VXESocket {
log.info("【vxeSocket】连接断开,总数为:" + socketPool.size());
} catch (Exception ignored) {
log.error("异常",ignored);
}
}
@@ -178,7 +180,6 @@ public class VXESocket {
*/
@OnMessage
public void onMessage(String message) {
// log.info("【vxeSocket】onMessage:" + message);
JSONObject json;
try {
json = JSON.parseObject(message);