Improved code readibility

This commit is contained in:
Luca Frosini 2022-02-28 10:28:48 +01:00
parent 0073fb84ce
commit 51fc8627b8
1 changed files with 3 additions and 2 deletions

View File

@ -37,14 +37,15 @@ public abstract class CKANUserCache {
}
public static CKANUser getCurrrentCKANUser() {
String context = SecretManager.instance.get().getContext();
SecretManager secretManager = SecretManager.instance.get();
String context = secretManager.getContext();
Cache<String,CKANUser> userCache = userCachePerContext.get(context);
if(userCache == null) {
userCache = cacheManager.createCache(context, userCacheConfiguration);
userCachePerContext.put(context, userCache);
}
String gcubeUsername = SecretManager.instance.get().getUser().getUsername();
String gcubeUsername = secretManager.getUser().getUsername();
CKANUser ckanUser = userCache.get(gcubeUsername);
if(ckanUser == null) {
ckanUser = new CKANUser();