arnabnandy7 commented on code in PR #22865:
URL: https://github.com/apache/kafka/pull/22865#discussion_r3855055099


##########
clients/src/main/java/org/apache/kafka/common/security/ssl/DefaultSslEngineFactory.java:
##########
@@ -150,6 +154,13 @@ public void configure(Map<String, ?> configs) {
             this.enabledProtocols = null;
         }
 
+        List<String> namedGroupsList = (List<String>) 
configs.get(SslConfigs.SSL_NAMED_GROUPS_CONFIG);
+        if (namedGroupsList != null && !namedGroupsList.isEmpty()) {
+            this.namedGroups = namedGroupsList.toArray(new String[0]);
+        } else {
+            this.namedGroups = null;
+        }

Review Comment:
   @MikeEdgar thanks for pointing this out. You’re right that JSSE treats 
`null` and an empty array differently.
   
   The current implementation combines an unset value and an explicitly empty 
list, so it can’t support that distinction. I’ll update it so an unset 
configuration preserves the provider defaults, while an explicitly empty list 
is passed through as an empty array. I’ll also add separate tests for unset, 
empty, and non-empty values.



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