You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LocaleEditor does not work with some locale strings [SPR-8099] #12754
The org.springframework.beans.propertyeditors.LocaleEditor is not giving the expected locale for some input formats.
I have created a test case with all the possible calls to Locale constructor.
Then, for each combination call the LocaleEditor with locale.toString().
The expected behaviour of the LocaleEditor would be to return the same testLocale as it received testLocale.toString(), but it does not.
The problem is with the StringUtils parseLocale method.
Attached the test case and a fix.
On the fix, the separator can be both a space and a underscore because the LocaleEditor states "Also accepts spaces as separators, as alternative to underscores"
Activity