Add @Nullable to setLocale in MockHttpServletResponse
See gh-26493
This commit is contained in:
parent
96ee8a3bc7
commit
5b3f11c543
|
@ -358,7 +358,10 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLocale(Locale locale) {
|
public void setLocale(@Nullable Locale locale) {
|
||||||
|
// Although the Javadoc for javax.servlet.ServletResponse.setLocale(Locale) does not
|
||||||
|
// state how a null value for the supplied Locale should be handled, both Tomcat and
|
||||||
|
// Jetty simply ignore a null value. So we do the same here.
|
||||||
if (locale == null) {
|
if (locale == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,7 +358,10 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setLocale(Locale locale) {
|
public void setLocale(@Nullable Locale locale) {
|
||||||
|
// Although the Javadoc for javax.servlet.ServletResponse.setLocale(Locale) does not
|
||||||
|
// state how a null value for the supplied Locale should be handled, both Tomcat and
|
||||||
|
// Jetty simply ignore a null value. So we do the same here.
|
||||||
if (locale == null) {
|
if (locale == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue