mimaison commented on code in PR #11985:
URL: https://github.com/apache/kafka/pull/11985#discussion_r848556316
##########
clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java:
##########
@@ -329,7 +330,7 @@
in("all", "-1", "0", "1"),
Importance.LOW,
ACKS_DOC)
- .define(COMPRESSION_TYPE_CONFIG, Type.STRING,
"none", Importance.HIGH, COMPRESSION_TYPE_DOC)
+ .define(COMPRESSION_TYPE_CONFIG, Type.STRING,
CompressionType.NONE.name, in(CompressionType.names().toArray(new String[0])),
Importance.HIGH, COMPRESSION_TYPE_DOC)
Review Comment:
If we add a `toString()` method to `CompressionType`:
```
@Override
public String toString() {
return name;
}
```
Then `Utils.enumOptions()` does what you want. Isn't that simpler?
--
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]