dongnuo123 commented on code in PR #14635:
URL: https://github.com/apache/kafka/pull/14635#discussion_r1392761140
##########
clients/src/main/java/org/apache/kafka/common/requests/LeaveGroupResponse.java:
##########
@@ -62,7 +62,7 @@ public LeaveGroupResponse(LeaveGroupResponseData data, short
version) {
if (version >= 3) {
this.data = data;
} else {
- if (data.members().size() != 1) {
Review Comment:
Do we need to use
```
if (data.errorCode() != Errors.NONE.code() && data.members().size() == 0) {
this.data = new LeaveGroupResponseData().setErrorCode(data.errorCode());
} else {...
```
I can't think of a situation where the top level error code is set and the
response has multiple members but just to make sure.
--
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]