New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flawed implementations of ResourceResolverChain and ResourceTransformerChain [SPR-16862] #21401

spring-issuemaster opened this Issue May 22, 2018 · 1 comment


None yet
2 participants
Copy link

spring-issuemaster commented May 22, 2018

Rossen Stoyanchev opened SPR-16862 and commented

The ResourceResolverChain and ResourceTransformerChain implementations in WebFlux use a List with a mutable index. This works as expected as long as resolvers and transformers use the chain instance when first called. However, if they use the chain from a nested, potentially asynchronous call that executes later, the chain index would almost certainly have a different value. 

Looking at the implementations, those that make a nested call, and are impacted, include VersionResourceResolver, WebJarsResourceResolver, CssLinkResourceTransformer and AppCacheManifestTransformer.

Unfortunately the issue went undetected by any tests since in many cases delegating to the chain from any point might still produce the right end results, with the PathResourceResolver at the end.


Affects: 5.0.6

Referenced from: commits f121aa5, a71bd7c


This comment has been minimized.

Copy link

spring-issuemaster commented May 23, 2018

Rossen Stoyanchev commented

This should be now fixed. In master (5.1+) both Spring MVC and WebFlux have been updated with the same immutable implementations for consistency with each other going forward. For the backport to 5.0.x only WebFlux has been updated, since technically it's not an issue in Spring MVC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment