【fix sonar】 TestSocketController.java 文件

This commit is contained in:
tianwenbo
2023-03-07 16:24:32 +08:00
parent f8c9ff5282
commit 702eaa7777
@@ -19,7 +19,7 @@ public class TestSocketController {
@PostMapping("/sendAll")
public Result<String> sendAll(@RequestBody JSONObject jsonObject) {
Result<String> result = new Result<String>();
Result<String> result = new Result<>();
String message = jsonObject.getString("message");
JSONObject obj = new JSONObject();
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
@@ -32,7 +32,7 @@ public class TestSocketController {
@PostMapping("/sendUser")
public Result<String> sendUser(@RequestBody JSONObject jsonObject) {
Result<String> result = new Result<String>();
Result<String> result = new Result<>();
String userId = jsonObject.getString("userId");
String message = jsonObject.getString("message");
JSONObject obj = new JSONObject();
@@ -45,4 +45,4 @@ public class TestSocketController {
return result;
}
}
}