Polish: lamdbas containing only one statement should not nest this statement in a block

This commit is contained in:
igor-suhorukov
2018-02-14 02:12:38 +03:00
committed by Juergen Hoeller
parent 99662bc702
commit 7826567df6
5 changed files with 8 additions and 22 deletions

View File

@@ -347,9 +347,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
Object key = generateKey(context, CacheOperationExpressionEvaluator.NO_RESULT);
Cache cache = context.getCaches().iterator().next();
try {
return wrapCacheValue(method, cache.get(key, () -> {
return unwrapReturnValue(invokeOperation(invoker));
}));
return wrapCacheValue(method, cache.get(key, () -> unwrapReturnValue(invokeOperation(invoker))));
}
catch (Cache.ValueRetrievalException ex) {
// The invoker wraps any Throwable in a ThrowableWrapper instance so we