From 9bf73f3ab846b2b76a239f789427bc7deb3fe8fa Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 28 Jul 2014 19:07:26 +0300 Subject: [PATCH] Document default locale in MockHttpServletRequest This commit updates the class-level Javadoc for MockHttpServletRequest with information regarding the default locale for the mocked server. Issue: SPR-11701 --- .../springframework/mock/web/MockHttpServletRequest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java index fc0199b036..f4228b3b3c 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java @@ -58,7 +58,12 @@ import org.springframework.util.StringUtils; /** * Mock implementation of the {@link javax.servlet.http.HttpServletRequest} interface. * - *

As of Spring 4.0, this set of mocks is designed on a Servlet 3.0 baseline. + *

The default, preferred {@link Locale} for the server mocked + * by this request is {@link Locale#ENGLISH}. This value can be changed + * via {@link #addPreferredLocale} or {@link #setPreferredLocales}. + * + *

As of Spring Framework 4.0, this set of mocks is designed on a Servlet + * 3.0 baseline. * * @author Juergen Hoeller * @author Rod Johnson