Skip to content

Commit 39d4550

Browse files
committed
Update ref doc references to Number/Currency/PercentStyleFormatter
Issue: SPR-17022
1 parent 833343f commit 39d4550

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/docs/asciidoc/core/core-validation.adoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,8 +1102,8 @@ should throw a ParseException or IllegalArgumentException if a parse attempt fai
11021102
care to ensure your Formatter implementation is thread-safe.
11031103

11041104
Several Formatter implementations are provided in `format` subpackages as a convenience.
1105-
The `number` package provides a `NumberFormatter`, `CurrencyFormatter`, and
1106-
`PercentFormatter` to format `java.lang.Number` objects using a `java.text.NumberFormat`.
1105+
The `number` package provides a `NumberStyleFormatter`, `CurrencyStyleFormatter`, and
1106+
`PercentStyleFormatter` to format `java.lang.Number` objects using a `java.text.NumberFormat`.
11071107
The `datetime` package provides a `DateFormatter` to format `java.util.Date` objects with
11081108
a `java.text.DateFormat`. The `datetime.joda` package provides comprehensive datetime
11091109
formatting support based on the http://joda-time.sourceforge.net[Joda-Time library].
@@ -1203,18 +1203,17 @@ specified:
12031203
return configureFormatterFrom(annotation, fieldType);
12041204
}
12051205
1206-
private Formatter<Number> configureFormatterFrom(NumberFormat annotation,
1207-
Class<?> fieldType) {
1206+
private Formatter<Number> configureFormatterFrom(NumberFormat annotation, Class<?> fieldType) {
12081207
if (!annotation.pattern().isEmpty()) {
1209-
return new NumberFormatter(annotation.pattern());
1208+
return new NumberStyleFormatter(annotation.pattern());
12101209
} else {
12111210
Style style = annotation.style();
12121211
if (style == Style.PERCENT) {
1213-
return new PercentFormatter();
1212+
return new PercentStyleFormatter();
12141213
} else if (style == Style.CURRENCY) {
1215-
return new CurrencyFormatter();
1214+
return new CurrencyStyleFormatter();
12161215
} else {
1217-
return new NumberFormatter();
1216+
return new NumberStyleFormatter();
12181217
}
12191218
}
12201219
}

0 commit comments

Comments
 (0)