Bug 5239: Using read lock where only reading from the preferences

collections
This commit is contained in:
Steffen Schaefer committed 2020-09-07 17:41:25 +02:00
1 parent 9ffcb815bd
commit e7f3a11cae
1 file changed
+1 -1
@@ -1307,7 +1307,7 @@ public class UserStoreImpl implements UserStore {
@Override
public <T> T getPreferenceObject(String username, String key) {
return LockUtil.executeWithWriteLockAndResult(preferenceLock, () -> {
return LockUtil.executeWithReadLockAndResult(preferenceLock, () -> {
final Object result;
Map<String, Object> userMap = preferenceObjects.get(username);
if (userMap != null) {