Skip to content

Commit

Permalink
Use ConcurrentHashMap to support full concurrency during retrievals…
Browse files Browse the repository at this point in the history
… and updated of the map
  • Loading branch information
besidev committed Sep 11, 2024
1 parent e1172ec commit a4067e1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;

/**
* Non-persistent implementation of {@code UserDetailsManager} which is backed
Expand All @@ -23,7 +24,7 @@ public class InMemoryUserManager implements UserManager {
private final Map<String, User> users;

public InMemoryUserManager() {
users = new HashMap<>();
users = new ConcurrentHashMap<>();
}

public InMemoryUserManager(@NotNull final Collection<User> users) {
Expand Down

0 comments on commit a4067e1

Please sign in to comment.