pandaapo commented on code in PR #4383:
URL: https://github.com/apache/eventmesh/pull/4383#discussion_r1298019886
##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/processor/SubscribeProcessor.java:
##########
@@ -85,9 +85,9 @@ public void process(final CloudEvent subscription, final
EventEmitter<CloudEvent
final String consumerGroup =
EventMeshCloudEventUtils.getConsumerGroup(subscription);
// Collect new clients in the subscription
- List<SubscriptionItem> subscriptionItems =
JsonUtils.parseTypeReferenceObject(subscription.getTextData(),
+ List<SubscriptionItem> subscriptionItems =
Objects.requireNonNull(JsonUtils.parseTypeReferenceObject(subscription.getTextData(),
new TypeReference<List<SubscriptionItem>>() {
- });
+ }), "subscriptionItems must not be null");;
Review Comment:
You should use `Objects.requireNonNull(subscriptionItems)` where code refer
to `subscriptionItems`, not here.
--
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]