This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch OAK-11881
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit ca3f3ffd7cc99c0ef0ff8304ea3d8a885bde5937
Author: Julian Reschke <[email protected]>
AuthorDate: Tue Aug 26 13:00:25 2025 +0100

    OAK-11881: Remove usage of Guava Maps.map()
---
 .../authentication/credentials/SimpleCredentialsSupport.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/SimpleCredentialsSupport.java
 
b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/SimpleCredentialsSupport.java
index d070d1f6d0..2bdc78df98 100644
--- 
a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/SimpleCredentialsSupport.java
+++ 
b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/SimpleCredentialsSupport.java
@@ -16,16 +16,15 @@
  */
 package org.apache.jackrabbit.oak.spi.security.authentication.credentials;
 
+import java.util.Arrays;
 import java.util.Collections;
+import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
 
 import javax.jcr.Credentials;
 import javax.jcr.SimpleCredentials;
 
-import org.apache.jackrabbit.guava.common.collect.Maps;
-
-import org.apache.jackrabbit.oak.commons.collections.SetUtils;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -64,8 +63,11 @@ public final class SimpleCredentialsSupport implements 
CredentialsSupport {
     @NotNull
     public Map<String, ?> getAttributes(@NotNull Credentials credentials) {
         if (credentials instanceof SimpleCredentials) {
-            final SimpleCredentials sc = (SimpleCredentials) credentials;
-            return 
Maps.asMap(Collections.unmodifiableSet(SetUtils.toLinkedSet(sc.getAttributeNames())),
 sc::getAttribute);
+            SimpleCredentials sc = (SimpleCredentials) credentials;
+            Map<String, Object> result = new LinkedHashMap<>();
+            Arrays.asList(sc.getAttributeNames()).forEach(
+                    attributeName -> result.put(attributeName, 
sc.getAttribute(attributeName)));
+            return result;
         } else {
             return Collections.emptyMap();
         }

Reply via email to