RockteMQ-AI commented on code in PR #4504:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4504#discussion_r4035819941
##########
server/src/main/java/org/apache/rocketmq/studio/provider/alibaba/AliyunInstanceProvider.java:
##########
@@ -117,6 +117,10 @@ public int countTopics(String instanceId) {
ListTopicsResponse response = clientFactory.call(ctx.credentialId(),
ctx.regionId(),
client -> client.listTopics(request));
ListTopicsResponseBody body = response == null ? null :
response.getBody();
+ if (body != null) {
Review Comment:
Inside `if (body != null)`, the ternary `body == null ? null :
body.getSuccess()` is redundant — `body` is guaranteed non-null. Simplify to
`body.getSuccess()`, `body.getCode()`, `body.getMessage()`. This pattern
repeats at lines 142, 193, and 299.
--
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]