From a9959723738fdde4a5cffa84664c87cab47eabad Mon Sep 17 00:00:00 2001 From: Qiang Zhao Date: Fri, 30 Sep 2022 13:57:14 +0800 Subject: [PATCH] [branch-2.10] Fix JDK compatibility issues. (#17904) --- .../org/apache/pulsar/proxy/server/ProxyRefreshAuthTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRefreshAuthTest.java b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRefreshAuthTest.java index 9ccb067adbf10..907865d76c579 100644 --- a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRefreshAuthTest.java +++ b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyRefreshAuthTest.java @@ -78,7 +78,7 @@ protected void doInitConf() throws Exception { superUserRoles.add("superUser"); conf.setSuperUserRoles(superUserRoles); - conf.setAuthenticationProviders(Set.of(AuthenticationProviderToken.class.getName())); + conf.setAuthenticationProviders(Collections.singleton(AuthenticationProviderToken.class.getName())); Properties properties = new Properties(); properties.setProperty("tokenSecretKey", AuthTokenUtils.encodeKeyBase64(SECRET_KEY)); conf.setProperties(properties); @@ -118,7 +118,7 @@ protected void setup() throws Exception { proxyConfig.setBrokerClientAuthenticationPlugin(AuthenticationToken.class.getName()); proxyConfig.setBrokerClientAuthenticationParameters( AuthTokenUtils.createToken(SECRET_KEY, "Proxy", Optional.empty())); - proxyConfig.setAuthenticationProviders(Set.of(AuthenticationProviderToken.class.getName())); + proxyConfig.setAuthenticationProviders(Collections.singleton(AuthenticationProviderToken.class.getName())); Properties properties = new Properties(); properties.setProperty("tokenSecretKey", AuthTokenUtils.encodeKeyBase64(SECRET_KEY)); proxyConfig.setProperties(properties);