Resolve package cycle around MissingServletRequestPartException #28455
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: regression
A bug that is also a regression
Milestone
Since #27910 / #27948
web.multipart.MissingServletRequestPartException
extendsweb.bind.ServletRequestBindingException
which unfortunately creates a package cycle since theweb.bind
package depends onweb.multipart
within its binder implementations.The root of the problem there is that
MissingServletRequestPartException
serves two rather different purposes: It is being thrown byRequestPartServletServerHttpRequest
as a low-level API exception (which is why it lives in theweb.multipart
package), but then also used byRequestParamMethodArgumentResolver
for handler method argument binding (for which it should actually live inweb.bind
). The proper solution would be to use a different exception type for the bind purpose, and to only let that one extendServletRequestBindingException
as of 6.0. Let's revisit this for M5.The text was updated successfully, but these errors were encountered: