From a6832dde6c05a508c1ebd395ad3cac28e2aa5386 Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Sun, 20 Jul 2025 22:01:00 -0500 Subject: [PATCH] Remove listenerScope field override in annotation processors This commit fixes the case where SpEL expressions using the `__listener.` bean ref were failing due to the concrete impls of the `AbstractPulsarAnnotationsBeanPostProcessor` hiding/overriding their parent's `listenerScope` field by removing the `listenerScope` field from the following concrete impls: - PulsarListenerAnnotationBeanPostProcessor - ReactivePulsarListenerAnnotationBeanPostProcessor Fixes #1169 Signed-off-by: Chris Bono --- .../ReactivePulsarListenerAnnotationBeanPostProcessor.java | 2 -- .../annotation/PulsarListenerAnnotationBeanPostProcessor.java | 2 -- 2 files changed, 4 deletions(-) diff --git a/spring-pulsar-reactive/src/main/java/org/springframework/pulsar/reactive/config/annotation/ReactivePulsarListenerAnnotationBeanPostProcessor.java b/spring-pulsar-reactive/src/main/java/org/springframework/pulsar/reactive/config/annotation/ReactivePulsarListenerAnnotationBeanPostProcessor.java index 7eec09c4..6396c362 100644 --- a/spring-pulsar-reactive/src/main/java/org/springframework/pulsar/reactive/config/annotation/ReactivePulsarListenerAnnotationBeanPostProcessor.java +++ b/spring-pulsar-reactive/src/main/java/org/springframework/pulsar/reactive/config/annotation/ReactivePulsarListenerAnnotationBeanPostProcessor.java @@ -109,8 +109,6 @@ public class ReactivePulsarListenerAnnotationBeanPostProcessor extends Abstra private final Set> nonAnnotatedClasses = Collections.newSetFromMap(new ConcurrentHashMap<>(64)); - private final ListenerScope listenerScope = new ListenerScope(); - private final AtomicInteger counter = new AtomicInteger(); private final List> processedEndpoints = new ArrayList<>(); diff --git a/spring-pulsar/src/main/java/org/springframework/pulsar/annotation/PulsarListenerAnnotationBeanPostProcessor.java b/spring-pulsar/src/main/java/org/springframework/pulsar/annotation/PulsarListenerAnnotationBeanPostProcessor.java index f60d5bc8..cc05802f 100644 --- a/spring-pulsar/src/main/java/org/springframework/pulsar/annotation/PulsarListenerAnnotationBeanPostProcessor.java +++ b/spring-pulsar/src/main/java/org/springframework/pulsar/annotation/PulsarListenerAnnotationBeanPostProcessor.java @@ -106,8 +106,6 @@ public class PulsarListenerAnnotationBeanPostProcessor extends AbstractPulsar private final Set> nonAnnotatedClasses = Collections.newSetFromMap(new ConcurrentHashMap<>(64)); - private final ListenerScope listenerScope = new ListenerScope(); - private final AtomicInteger counter = new AtomicInteger(); private final List> processedEndpoints = new ArrayList<>();