From 39d455073a423ba6b3dc691c9c6130b395c93308 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 9 Jul 2018 15:48:45 +0200 Subject: [PATCH] Update ref doc references to Number/Currency/PercentStyleFormatter Issue: SPR-17022 --- src/docs/asciidoc/core/core-validation.adoc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/docs/asciidoc/core/core-validation.adoc b/src/docs/asciidoc/core/core-validation.adoc index a3a99e624f..2e711789be 100644 --- a/src/docs/asciidoc/core/core-validation.adoc +++ b/src/docs/asciidoc/core/core-validation.adoc @@ -1102,8 +1102,8 @@ should throw a ParseException or IllegalArgumentException if a parse attempt fai care to ensure your Formatter implementation is thread-safe. Several Formatter implementations are provided in `format` subpackages as a convenience. -The `number` package provides a `NumberFormatter`, `CurrencyFormatter`, and -`PercentFormatter` to format `java.lang.Number` objects using a `java.text.NumberFormat`. +The `number` package provides a `NumberStyleFormatter`, `CurrencyStyleFormatter`, and +`PercentStyleFormatter` to format `java.lang.Number` objects using a `java.text.NumberFormat`. The `datetime` package provides a `DateFormatter` to format `java.util.Date` objects with a `java.text.DateFormat`. The `datetime.joda` package provides comprehensive datetime formatting support based on the http://joda-time.sourceforge.net[Joda-Time library]. @@ -1203,18 +1203,17 @@ specified: return configureFormatterFrom(annotation, fieldType); } - private Formatter configureFormatterFrom(NumberFormat annotation, - Class fieldType) { + private Formatter configureFormatterFrom(NumberFormat annotation, Class fieldType) { if (!annotation.pattern().isEmpty()) { - return new NumberFormatter(annotation.pattern()); + return new NumberStyleFormatter(annotation.pattern()); } else { Style style = annotation.style(); if (style == Style.PERCENT) { - return new PercentFormatter(); + return new PercentStyleFormatter(); } else if (style == Style.CURRENCY) { - return new CurrencyFormatter(); + return new CurrencyStyleFormatter(); } else { - return new NumberFormatter(); + return new NumberStyleFormatter(); } } } -- GitLab