m1a2st commented on code in PR #16899:
URL: https://github.com/apache/kafka/pull/16899#discussion_r1855038087


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java:
##########
@@ -713,9 +733,19 @@ private void maybeOverrideEnableAutoCommit(Map<String, 
Object> configs) {
         }
     }
 
-    private void checkGroupRemoteAssignor() {
-        if 
(getString(GROUP_PROTOCOL_CONFIG).equalsIgnoreCase(GroupProtocol.CLASSIC.name())
 && getString(GROUP_REMOTE_ASSIGNOR_CONFIG) != null && 
!getString(GROUP_REMOTE_ASSIGNOR_CONFIG).isEmpty()) {
-            throw new ConfigException(GROUP_REMOTE_ASSIGNOR_CONFIG + " cannot 
be set when " + GROUP_PROTOCOL_CONFIG + "=" + GroupProtocol.CLASSIC.name());
+    private void checkUnsupportedConfigs(GroupProtocol groupProtocol, 
List<String> unsupportedConfigs) {
+        StringBuilder unsupportedConfigsStr = new StringBuilder();
+        if 
(getString(GROUP_PROTOCOL_CONFIG).equalsIgnoreCase(groupProtocol.name())) {
+            unsupportedConfigs.forEach(configName -> {
+                Object config = originals().get(configName);
+                if (config != null && !Utils.isBlank(config.toString())) {
+                    unsupportedConfigsStr.append(configName).append(", ");
+                }
+            });
+            if (unsupportedConfigsStr.length() > 0) {

Review Comment:
   Java 11 doesn't have `StringBuilder#isEmpty` it support 15+



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