Skip to content

Commit

Permalink
Check for null value with the appropriate assertion method (opengoofy…
Browse files Browse the repository at this point in the history
  • Loading branch information
valery1707 authored Oct 5, 2023
1 parent 5bb1f4a commit 472d345
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected void execute(RobotMessageExecuteDTO robotMessageExecuteDTO) {
weChatReq.setMarkdown(markdown);
String responseBody = HttpUtil.post(serverUrl, weChatReq);
WeChatRobotResponse response = JSONUtil.parseObject(responseBody, WeChatRobotResponse.class);
Assert.isTrue(response != null, "Response is null.");
Assert.notNull(response, "Response is null.");
if (response.getErrcode() != 0) {
log.error("WeChat failed to send message, reason : {}", response.errmsg);
}
Expand Down

0 comments on commit 472d345

Please sign in to comment.