chia7712 commented on code in PR #20156: URL: https://github.com/apache/kafka/pull/20156#discussion_r2274910909
########## connect/runtime/src/test/java/org/apache/kafka/connect/runtime/distributed/DistributedHerderTest.java: ########## @@ -4188,12 +4186,12 @@ private void expectRebalance(final Collection<String> revokedConnectors, if (connectProtocolVersion == CONNECT_PROTOCOL_V0) { assignment = new ExtendedAssignment( connectProtocolVersion, error, leader, leaderUrl, offset, - assignedConnectors, assignedTasks, - Collections.emptyList(), Collections.emptyList(), 0); + new ArrayList<>(assignedConnectors), new ArrayList<>(assignedTasks), + List.of(), List.of(), 0); } else { assignment = new ExtendedAssignment( connectProtocolVersion, error, leader, leaderUrl, offset, - assignedConnectors, assignedTasks, + new ArrayList<>(assignedConnectors), new ArrayList<>(assignedTasks), Review Comment: line#4190 still pass immutable collections to the `ExtendedAssignment`. Could you please change them to `ArrayList`? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org