Avoid CacheAspectSupport#findInCaches fall through to reactive handler

Prior to this commit if the return type is a CompletableFuture but a
cache get returns null, the execution falls through to the
reactiveCachingHandler.

This commit ensures that evaluation instead continues onto the next
cache (if any).

Closes gh-33371
This commit is contained in:
Simon Baslé
2024-08-12 14:54:15 +02:00
parent 289c35c829
commit f4a73b79b8

View File

@@ -510,6 +510,9 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
(value != null ? CompletableFuture.completedFuture(unwrapCacheValue(value)) : null),
invoker, method, contexts));
}
else {
continue;
}
}
if (this.reactiveCachingHandler != null) {
Object returnValue = this.reactiveCachingHandler.findInCaches(