chia7712 commented on code in PR #17460:
URL: https://github.com/apache/kafka/pull/17460#discussion_r1796396868


##########
clients/src/main/java/org/apache/kafka/common/internals/Topic.java:
##########
@@ -37,7 +36,7 @@ public class Topic {
     public static final String LEGAL_CHARS = "[a-zA-Z0-9._-]";
 
     private static final Set<String> INTERNAL_TOPICS = 
Collections.unmodifiableSet(

Review Comment:
   The doc of `Set.of` says it return unmodifiable set, so we don't need to 
wrap it again, right?  



##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java:
##########
@@ -205,7 +205,7 @@ public Optional<String> serverConfigName(String configName) 
{
     private static final String MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_DOC = 
TopicConfig.MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_DOC;
 
     // Visible for testing
-    public static final Set<String> CONFIGS_WITH_NO_SERVER_DEFAULTS = 
Collections.unmodifiableSet(Utils.mkSet(
+    public static final Set<String> CONFIGS_WITH_NO_SERVER_DEFAULTS = 
Collections.unmodifiableSet(Set.of(

Review Comment:
   ditto. we don't need redundant wrap



##########
metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java:
##########
@@ -491,7 +491,7 @@ void alterTopicConfig(
         }
 
         void fenceBrokers(Integer... brokerIds) {
-            fenceBrokers(Utils.mkSet(brokerIds));
+            fenceBrokers(Set.of(brokerIds));

Review Comment:
   The failure is caused by the undefined order. I file 
https://issues.apache.org/jira/browse/KAFKA-17772 to fix it for now.



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

Reply via email to