From 11fde24278e15807e1f7c9d65484b92d0a51711a Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Thu, 8 Apr 2021 15:20:15 +0300 Subject: [PATCH] Ignore abstract classes in Filter hierarchy Fixes: #16359 (cherry picked from commit ee723bc3228f0ef2873f15360d8ce2eed38245b4) --- .../scanning/ResteasyReactiveInterceptorScanner.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/scanning/ResteasyReactiveInterceptorScanner.java b/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/scanning/ResteasyReactiveInterceptorScanner.java index 2e63e5576af73..c9af2ce7968ac 100644 --- a/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/scanning/ResteasyReactiveInterceptorScanner.java +++ b/independent-projects/resteasy-reactive/common/processor/src/main/java/org/jboss/resteasy/reactive/common/processor/scanning/ResteasyReactiveInterceptorScanner.java @@ -1,5 +1,6 @@ package org.jboss.resteasy.reactive.common.processor.scanning; +import java.lang.reflect.Modifier; import java.util.Collection; import java.util.HashSet; import java.util.Set; @@ -84,6 +85,9 @@ public static void scanForIOInterceptors(ResourceInterceptors interceptors, Inde private static void handleDiscoveredInterceptor( ApplicationScanningResult applicationResultBuildItem, InterceptorContainer interceptorContainer, IndexView index, ClassInfo filterClass) { + if (Modifier.isAbstract(filterClass.flags())) { + return; + } ApplicationScanningResult.KeepProviderResult keepProviderResult = applicationResultBuildItem.keepProvider(filterClass); if (keepProviderResult != ApplicationScanningResult.KeepProviderResult.DISCARD) { ResourceInterceptor interceptor = interceptorContainer.create();