mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
265299c790
Previous to this commit, MockHttpServletRequestBuilder was not binary compatible as its methods had moved to a parent class with a generic argument on the return type. MockMultipartHttpServletRequestBuilder was also not source compatible as it no longed extended from MockHttpServletRequestBuilder. Both these changes were introduced to allow the AssertJ support to expose builders that implement an extra AssertJ interface, without copying the features the builders provide. This commit restore compatibility. For MockHttpServletRequestBuilder we simply override all methods that returns the generic type into the resolved type. MockMultipartHttpServletRequestBuilder is more involved. Because we need to extend from MockHttpServletRequestBuilder, we have no other choice than duplicating the code. For now, the abstract builder for multipart is only used by the AssertJ support, but we can revisit this again in a major release. Closes gh-33229