dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40709
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20694: Minor
------------------------------------------------------------
revno: 20694
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-10-14 12:26:36 +0200
message:
Minor
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java 2015-10-14 09:35:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java 2015-10-14 10:26:36 +0000
@@ -49,7 +49,7 @@
implements UserSettingService
{
/**
- * Cache for user settings. Does not accept nulls. Key is name + username.
+ * Cache for user settings. Does not accept nulls. Key is "name-username".
*/
private static Cache<String, Optional<Serializable>> SETTING_CACHE = CacheBuilder.newBuilder()
.expireAfterAccess( 15, TimeUnit.MINUTES )
@@ -226,9 +226,7 @@
{
String cacheKey = getCacheKey( name, user.getUsername() );
- Optional<Serializable> setting = SETTING_CACHE.get( cacheKey, () -> getUserSettingOptional( user, name ) );
-
- return setting;
+ return SETTING_CACHE.get( cacheKey, () -> getUserSettingOptional( user, name ) );
}
catch ( ExecutionException ignored )
{