kirktrue commented on code in PR #14670:
URL: https://github.com/apache/kafka/pull/14670#discussion_r1381991173


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java:
##########
@@ -695,17 +696,16 @@ else if (newConfigs.get(VALUE_DESERIALIZER_CLASS_CONFIG) 
== null)
         return newConfigs;
     }
 
-    boolean maybeOverrideEnableAutoCommit() {
+    private void maybeOverrideEnableAutoCommit(Map<String, Object> configs) {
         Optional<String> groupId = 
Optional.ofNullable(getString(CommonClientConfigs.GROUP_ID_CONFIG));
-        boolean enableAutoCommit = 
getBoolean(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG);
+        boolean enableAutoCommit = 
values().containsKey(ENABLE_AUTO_COMMIT_CONFIG) ? 
getBoolean(ENABLE_AUTO_COMMIT_CONFIG) : false;

Review Comment:
   We can't call `getBoolean` because if the value isn't there, it throws an 
exception. We have to look at the `originals` to get the values that were 
passed in by the user.



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