mimaison commented on code in PR #17895:
URL: https://github.com/apache/kafka/pull/17895#discussion_r1854154416
##########
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:
You're right, that's not needed. Removed
--
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]