TTL Object retrieving fix

This commit is contained in:
Fabio Sinibaldi 2021-09-07 11:28:11 +02:00
parent 3c129484d4
commit 76d1113af0
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,9 @@ public abstract class AbstractScopedMap<T> implements Engine<T>{
if(found== null){
log.debug(name+" : init object for context "+currentScope);
return scopeMap.put(currentScope, new TTLObject<T>(LocalDateTime.now(),retrieveObject())).getTheObject();
TTLObject<T> toPut=new TTLObject<T>(LocalDateTime.now(),retrieveObject());
scopeMap.put(currentScope, toPut);
return toPut.getTheObject();
}
if(TTL!=null) {