Fix NoOpCache handling of get(key,callable)
This commit fixes the method that takes a Callable to actually always invoke it rather than returning null. Issue: SPR-14445
This commit is contained in:
@@ -102,7 +102,12 @@ public class NoOpCacheManager implements CacheManager {
|
||||
|
||||
@Override
|
||||
public <T> T get(Object key, Callable<T> valueLoader) {
|
||||
return null;
|
||||
try {
|
||||
return valueLoader.call();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new ValueRetrievalException(key, valueLoader, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user