frankvicky commented on code in PR #22545:
URL: https://github.com/apache/kafka/pull/22545#discussion_r3397402588


##########
group-coordinator/group-coordinator-api/src/main/java/org/apache/kafka/coordinator/group/api/streams/StreamsGroupTopologyDescription.java:
##########
@@ -58,24 +59,24 @@ public sealed interface Node {
     public record Source(String name, Set<String> topics, Set<String> 
successors) implements Node {
         public Source {
             Objects.requireNonNull(name, "name");
-            topics = Set.copyOf(Objects.requireNonNull(topics, "topics"));
-            successors = Set.copyOf(Objects.requireNonNull(successors, 
"successors"));
+            topics = 
Collections.unmodifiableSet(Objects.requireNonNull(topics, "topics"));

Review Comment:
   `Set.copyOf` doesn't guarantee the order, so I change to `unmodifiableSet`



-- 
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]

Reply via email to