diff --git a/extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/CacheInterceptor.java b/extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/CacheInterceptor.java index 8a1e52d312a4c..d92a7d8664fd3 100644 --- a/extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/CacheInterceptor.java +++ b/extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/CacheInterceptor.java @@ -71,9 +71,10 @@ public CacheInterceptionContext get() { private Optional> getArcCacheInterceptionContext( InvocationContext invocationContext, Class interceptorBindingClass) { Set bindings = InterceptorBindings.getInterceptorBindingLiterals(invocationContext); - if (bindings == null) { - LOGGER.trace("Interceptor bindings not found in ArC"); - // This should only happen when the interception is not managed by Arc. + if (bindings == null || bindings.isEmpty() || !(bindings.iterator().next() instanceof AbstractAnnotationLiteral)) { + // this should only happen when the interception is not managed by ArC + // a non-`AbstractAnnotationLiteral` can come from RESTEasy Classic's `QuarkusInvocationContextImpl` + LOGGER.trace("Interceptor bindings not found in ArC or not created by ArC"); return Optional.empty(); } List interceptorBindings = new ArrayList<>();