Check for null value with the appropriate assertion method (#1493)

pull/1499/head
valery1707 9 months ago committed by GitHub
parent 5bb1f4ab33
commit 472d345285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -66,7 +66,7 @@ public class WeChatSendMessageHandler extends AbstractRobotSendMessageHandler {
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);
}

Loading…
Cancel
Save