Copilot commented on code in PR #10781:
URL: https://github.com/apache/rocketmq/pull/10781#discussion_r3701969904
##########
proxy/src/main/java/org/apache/rocketmq/proxy/service/message/ClusterMessageService.java:
##########
@@ -159,6 +159,12 @@ public CompletableFuture<AckResult>
ackMessage(ProxyContext ctx, ReceiptHandle h
public CompletableFuture<AckResult> batchAckMessage(ProxyContext ctx,
List<ReceiptHandleMessage> handleList,
String consumerGroup,
String topic, long timeoutMillis) {
+ if (handleList == null || handleList.isEmpty()) {
+ return FutureUtils.completeExceptionally(new ProxyException(
+ ProxyExceptionCode.INVALID_RECEIPT_HANDLE,
+ "receipt handle list is empty"
+ ));
+ }
Review Comment:
The guard rejects both null and empty handle lists, but the error message
only mentions "empty". This can be misleading when the caller passes null;
consider wording that covers both cases to keep the returned Proxy error
accurate.
--
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]