Alonexc commented on code in PR #3262:
URL:
https://github.com/apache/incubator-eventmesh/pull/3262#discussion_r1119488366
##########
eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/EventMeshHttpConsumer.java:
##########
@@ -98,8 +98,8 @@ public void subscribe(final List<SubscriptionItem> topicList,
final String subsc
try {
final String subRes = HttpUtils.post(httpClient, target,
subscribeParam);
final EventMeshRetObj ret = JsonUtils.parseObject(subRes,
EventMeshRetObj.class);
- if (ret.getRetCode() != EventMeshRetCode.SUCCESS.getRetCode()) {
- throw new EventMeshException(ret.getRetCode(),
ret.getRetMsg());
+ if (Object.requireNonNull(ret).getRetCode() !=
EventMeshRetCode.SUCCESS.getRetCode()) {
Review Comment:
Modify: Objects.requireNonNull()
The same is true for other repair points.
--
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]