mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
c19b2851f1
Prior to this commit, calls to setLocale() MockHttpServletResponse would result in a NullPointerException if the supplied Locale was null. Although the Javadoc for setLocale(Locale) and addHeader(String, String) in javax.servlet.ServletResponse does not specify how a null Locale should be handled, both Tomcat and Jetty simply ignore a null value. This commit therefore updates MockHttpServletResponse to silently ignore a null Locale passed to setLocale(). Closes gh-26493