chia7712 commented on code in PR #17895:
URL: https://github.com/apache/kafka/pull/17895#discussion_r1854141973


##########
clients/src/test/java/org/apache/kafka/common/security/oauthbearer/internals/OAuthBearerSaslServerTest.java:
##########
@@ -52,14 +52,10 @@
 
 public class OAuthBearerSaslServerTest {
     private static final String USER = "user";
-    private static final Map<String, ?> CONFIGS;
-    static {
-        String jaasConfigText = 
"org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule Required"
+    private static final String JAAS_CONFIG_TEXT = 
"org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule Required"
                 + " unsecuredLoginStringClaim_sub=\"" + USER + "\";";
-        Map<String, Object> tmp = new HashMap<>();
-        tmp.put(SaslConfigs.SASL_JAAS_CONFIG, new Password(jaasConfigText));
-        CONFIGS = Collections.unmodifiableMap(tmp);
-    }
+    private static final Map<String, ?> CONFIGS = Map.<String, 
Object>of(SaslConfigs.SASL_JAAS_CONFIG, new Password(JAAS_CONFIG_TEXT));

Review Comment:
   we don't need `<String, Object>`, right?



##########
clients/src/main/java/org/apache/kafka/common/requests/DescribeConfigsResponse.java:
##########
@@ -17,7 +17,6 @@
 
 package org.apache.kafka.common.requests;
 
-import org.apache.kafka.clients.admin.ConfigEntry;

Review Comment:
   this is interesting. we have two almost same `ConfigEntry` ... 
`org.apache.kafka.clients.admin.ConfigEntry` and 
`org.apache.kafka.common.requests.DescribeConfigsResponse.ConfigEntry` 



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