diff --git a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java index 29bf43af38562e632259eee6c708db71698b26c5..5a327f710e0cb2216d22d6f44d8015293fc0ffef 100644 --- a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java +++ b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,9 +23,9 @@ import org.springframework.util.StringUtils; /** * Editor for {@code java.util.Locale}, to directly populate a Locale property. * - *

Expects the same syntax as Locale's {@code toString}, i.e. language + + *

Expects the same syntax as Locale's {@code toString()}, i.e. language + * optionally country + optionally variant, separated by "_" (e.g. "en", "en_US"). - * Also accepts spaces as separators, as alternative to underscores. + * Also accepts spaces as separators, as an alternative to underscores. * * @author Juergen Hoeller * @since 26.05.2003 diff --git a/src/docs/asciidoc/core/core-validation.adoc b/src/docs/asciidoc/core/core-validation.adoc index c21f142877c96ef28a81d2b9d80a5dc1b6cea0b1..9a1bac7d1c0a8a0eb41ff016d43026cb224922cc 100644 --- a/src/docs/asciidoc/core/core-validation.adoc +++ b/src/docs/asciidoc/core/core-validation.adoc @@ -501,7 +501,7 @@ the various `PropertyEditor` implementations that Spring provides: | `LocaleEditor` | Can resolve strings to `Locale` objects and vice-versa (the string format is `[language]\_[country]_[variant]`, same as the `toString()` method of - `Locale`). Also accepts spaces as separators, as alternative to underscores. + `Locale`). Also accepts spaces as separators, as an alternative to underscores. By default, registered by `BeanWrapperImpl`. | `PatternEditor`