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


##########
clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java:
##########
@@ -1051,13 +1051,13 @@ public static ValidString in(String... validStrings) {
         public void ensureValid(String name, Object o) {
             String s = (String) o;
             if (!validStrings.contains(s)) {
-                throw new ConfigException(name, o, "String must be one of: " + 
Utils.join(validStrings, ", "));
+                throw new ConfigException(name, o, "String must be one of: " + 
String.join(",", validStrings));

Review Comment:
   `,` -> `, `



##########
clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java:
##########
@@ -1079,12 +1079,12 @@ public static CaseInsensitiveValidString in(String... 
validStrings) {
         public void ensureValid(String name, Object o) {
             String s = (String) o;
             if (s == null || 
!validStrings.contains(s.toUpperCase(Locale.ROOT))) {
-                throw new ConfigException(name, o, "String must be one of 
(case insensitive): " + Utils.join(validStrings, ", "));
+                throw new ConfigException(name, o, "String must be one of 
(case insensitive): " + String.join(",", validStrings));
             }
         }
 
         public String toString() {
-            return "(case insensitive) [" + Utils.join(validStrings, ", ") + 
"]";
+            return "(case insensitive) [" + String.join(",", validStrings) + 
"]";

Review Comment:
   ditto



##########
clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java:
##########
@@ -1051,13 +1051,13 @@ public static ValidString in(String... validStrings) {
         public void ensureValid(String name, Object o) {
             String s = (String) o;
             if (!validStrings.contains(s)) {
-                throw new ConfigException(name, o, "String must be one of: " + 
Utils.join(validStrings, ", "));
+                throw new ConfigException(name, o, "String must be one of: " + 
String.join(",", validStrings));
             }
 
         }
 
         public String toString() {
-            return "[" + Utils.join(validStrings, ", ") + "]";
+            return "[" + String.join(",", validStrings) + "]";

Review Comment:
   ditto



##########
clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java:
##########
@@ -1205,7 +1205,8 @@ public void ensureValid(String name, Object value) {
             }
 
             if (!foundIllegalCharacters.isEmpty()) {
-                throw new ConfigException(name, value, "String may not contain 
control sequences but had the following ASCII chars: " + 
Utils.join(foundIllegalCharacters, ", "));
+                throw new ConfigException(name, value, "String may not contain 
control sequences but had the following ASCII chars: " +
+                        
foundIllegalCharacters.stream().map(Object::toString).collect(Collectors.joining(",")));

Review Comment:
   ditto



##########
clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java:
##########
@@ -1079,12 +1079,12 @@ public static CaseInsensitiveValidString in(String... 
validStrings) {
         public void ensureValid(String name, Object o) {
             String s = (String) o;
             if (s == null || 
!validStrings.contains(s.toUpperCase(Locale.ROOT))) {
-                throw new ConfigException(name, o, "String must be one of 
(case insensitive): " + Utils.join(validStrings, ", "));

Review Comment:
   ditto



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