mimaison commented on code in PR #14756:
URL: https://github.com/apache/kafka/pull/14756#discussion_r1394485129
##########
clients/src/main/java/org/apache/kafka/common/security/ssl/SslFactory.java:
##########
@@ -185,6 +188,18 @@ private SslEngineFactory
createNewSslEngineFactory(Map<String, ?> newConfigs) {
}
}
+ private static boolean getBoolean(final Map<String, Object> configs, final
String key, final boolean defaultValue) {
+ final Object value = configs.getOrDefault(key, defaultValue);
+ if (value instanceof Boolean) {
+ return (boolean) value;
+ } else if (value instanceof String) {
+ return Boolean.parseBoolean((String) value);
+ } else {
+ log.warn("Invalid value (" + value + ") on internal configuration
'" + key + "'. Please specify a true/false value.");
Review Comment:
Can we remove `internal` from this message since these 2 settings are part
of the public configuration? I'm guessing you copied that method from
`StreamsConfig`.
I also don't think this `else` block is reachable in practice as
AbstractConfig should have validated the types beforehand but it's ok to keep
the warning.
--
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]