With both MatrixVariable enabled and UrlDecode disabled, then the PathVariables are not matched correctly. I'm on : 5.0.6.RELEASE/spring-webmvc-5.0.6.RELEASE-sources.jar
I have a case where I have PathVariables and MatrixVariables (plus I have encoded string as MatrixVariable value).
My WebConfig looks like this:
With this after the MatrixVariable extraction happens in RequestMappingInfoHandlerMapping with decoded params pointing to a newly created map, the new truncated pathVariable values are not reflected in URI_TEMPLATE_VARIABLES_ATTRIBUTE of the request. Whereas without decoding, it is referring to the old map uriVariables and things work fine.
I hope it explains the problem clearly.