lossend opened a new pull request, #775:
URL: https://github.com/apache/rocketmq-spring/pull/775
## Problem
In `RocketMQMessageListenerBeanPostProcessor.buildEnhancer()`, the lambda
accumulates
enhanced annotation attributes into `newAttrs` across all registered
`AnnotationEnhancer`
beans, but then returns the original `attrs` instead of `newAttrs`.
This means every `AnnotationEnhancer` bean is silently a no-op — its
attribute
modifications are computed but thrown away.
## Fix
Return `newAttrs` instead of `attrs`.
```java
// before
return attrs;
// after
return newAttrs;
```
## Root Cause
`buildEnhancer()` (line 178–184):
```java
this.enhancer = (attrs, element) -> {
Map<String, Object> newAttrs = attrs;
for (AnnotationEnhancer enh : enhancers) {
newAttrs = enh.apply(newAttrs, element);
}
return attrs; // BUG: should be newAttrs
};
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]