Open GFriedrich opened 1 year ago
When registering multiple context preprocessors, only the last processor is applied.
@Toggle
All pre processors should be taken into account.
No response
The problem here is within the FeatureAdvisor class: https://github.com/Unleash/unleash-spring-boot-starter/blob/2ceccc9b757fd0735a3d87b3354f55bd1e3143c7/springboot-unleash-core/src/main/java/org/unleash/features/aop/FeatureAdvisor.java#L147
FeatureAdvisor
As you can see the preProcess method is called each time with the original supplier argument instead of using the previously wrapped returnValue.
supplier
returnValue
A correct line should be returnValue = contextPreProcessor.preProcess(returnValue);
returnValue = contextPreProcessor.preProcess(returnValue);
1.0.1
None
Describe the bug
When registering multiple context preprocessors, only the last processor is applied.
Steps to reproduce the bug
@Toggle
annotationExpected behavior
All pre processors should be taken into account.
Logs, error output, etc.
No response
Screenshots
No response
Additional context
The problem here is within the
FeatureAdvisor
class: https://github.com/Unleash/unleash-spring-boot-starter/blob/2ceccc9b757fd0735a3d87b3354f55bd1e3143c7/springboot-unleash-core/src/main/java/org/unleash/features/aop/FeatureAdvisor.java#L147As you can see the preProcess method is called each time with the original
supplier
argument instead of using the previously wrappedreturnValue
.A correct line should be
returnValue = contextPreProcessor.preProcess(returnValue);
Unleash version
1.0.1
Subscription type
None
Hosting type
None
SDK information (language and version)
No response