Closed
Description
Jens Wilke opened SPR-17052 and commented
Code from CacheAspectSupport
:
// Special handling of synchronized invocation
if (contexts.isSynchronized()) {
...
try {
return wrapCacheValue(method, cache.get(key, () -> {
return unwrapReturnValue(invokeOperation(invoker));
}));
}
catch (Cache.ValueRetrievalException ex) {
// The invoker wraps any Throwable in a ThrowableWrapper instance so we
// can just make sure that one bubbles up the stack.
throw (CacheOperationInvoker.ThrowableWrapper) ex.getCause();
}
}
- In the code path for
@Cachable(sync=true)
CacheErrorHandler
is not visited. - cast to (CacheOperationInvoker.ThrowableWrapper) is not totally sane, it could be omitted since then the unwrapping would happen in
CacheInterceptor.invoke
Affects: 5.0.7