RivenSun2 commented on code in PR #12077:
URL: https://github.com/apache/kafka/pull/12077#discussion_r857050627


##########
clients/src/main/java/org/apache/kafka/clients/consumer/OffsetResetStrategy.java:
##########
@@ -16,6 +16,13 @@
  */
 package org.apache.kafka.clients.consumer;
 
+import java.util.Locale;
+
 public enum OffsetResetStrategy {
-    LATEST, EARLIEST, NONE
+    LATEST, EARLIEST, NONE;
+
+    @Override
+    public String toString() {
+        return super.toString().toLowerCase(Locale.ROOT);

Review Comment:
   Quoting the comment above Locale.ROOT
   >  This is regarded as the base locale of all locales, and is used as the 
language/country neutral locale for the locale sensitive operations.
   
   I think this is better than if we use `toLowerCase(Locale.ENGLISH)`
   
   At the same time, the same method is used for `isolation.level` in 
`ConsumerConfig`.
   ```
                                   .define(ISOLATION_LEVEL_CONFIG,
                                           Type.STRING,
                                           DEFAULT_ISOLATION_LEVEL,
                                           
in(IsolationLevel.READ_COMMITTED.toString().toLowerCase(Locale.ROOT), 
IsolationLevel.READ_UNCOMMITTED.toString().toLowerCase(Locale.ROOT)),
                                           Importance.MEDIUM,
                                           ISOLATION_LEVEL_DOC)
   ```
   



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