Added synchronized to methods
This commit is contained in:
parent
38b3c9aa72
commit
7db232b970
|
@ -40,7 +40,7 @@ public abstract class CKANUserCache {
|
|||
private CKANUserCache() {
|
||||
}
|
||||
|
||||
public static CKANUser getCurrrentCKANUser() {
|
||||
public synchronized static CKANUser getCurrrentCKANUser() {
|
||||
SecretManager secretManager = SecretManagerProvider.instance.get();
|
||||
String context = secretManager.getContext();
|
||||
Cache<String,CKANUser> userCache = userCachePerContext.get(context);
|
||||
|
@ -59,7 +59,7 @@ public abstract class CKANUserCache {
|
|||
return ckanUser;
|
||||
}
|
||||
|
||||
public static void removeUserFromCache() {
|
||||
public synchronized static void removeUserFromCache() {
|
||||
SecretManager secretManager = SecretManagerProvider.instance.get();
|
||||
String context = secretManager.getContext();
|
||||
Cache<String,CKANUser> userCache = userCachePerContext.get(context);
|
||||
|
|
Loading…
Reference in New Issue