Improved code readibility
This commit is contained in:
parent
0073fb84ce
commit
51fc8627b8
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue