scholzj commented on code in PR #14756:
URL: https://github.com/apache/kafka/pull/14756#discussion_r1394966608


##########
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:
   Ok, fixed.
   
   Yes, I copied it form the StreamsConfig as that is not available. I was not 
sure if there is some place shared by both classes where I could move it to 
keep it only once. 



##########
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:
   Ok, fixed.
   
   Yes, I copied it from the StreamsConfig as that is not available. I was not 
sure if there is some place shared by both classes where I could move it to 
keep it only once. 



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