diff --git a/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java b/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java index 414c019598..393c3ce2dc 100644 --- a/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java +++ b/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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,7 +23,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Declares that a field should be formatted as a date time. + * Declares that a field or method parameter should be formatted as a date or time. * *
Supports formatting by style pattern, ISO date time pattern, or custom format pattern string. * Can be applied to {@code java.util.Date}, {@code java.util.Calendar}, {@code java.lang.Long}, @@ -35,7 +35,7 @@ import java.lang.annotation.Target; * A date or time may be omitted by specifying the style character '-'. * *
For ISO-based formatting, set the {@link #iso} attribute to be the desired {@link ISO} format, - * such as {@link ISO#DATE}. For custom formatting, set the {@link #pattern()} attribute to be the + * such as {@link ISO#DATE}. For custom formatting, set the {@link #pattern} attribute to be the * DateTime pattern, such as {@code yyyy/MM/dd hh:mm:ss a}. * *
Each attribute is mutually exclusive, so only set one attribute per annotation instance @@ -64,7 +64,7 @@ public @interface DateTimeFormat { /** * The ISO pattern to use to format the field. - * The possible ISO patterns are defined in the {@link ISO} enum. + *
The possible ISO patterns are defined in the {@link ISO} enum. *
Defaults to {@link ISO#NONE}, indicating this attribute should be ignored. * Set this attribute when you wish to format your field in accordance with an ISO format. */ diff --git a/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java b/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java index d56c46cae9..3424143ec5 100644 --- a/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java +++ b/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 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,7 +23,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Declares that a field should be formatted as a number. + * Declares that a field or method parameter should be formatted as a number. * *
Supports formatting by style or custom pattern string. * Can be applied to any JDK {@code java.lang.Number} type. @@ -37,7 +37,7 @@ import java.lang.annotation.Target; * When the {@link #pattern} attribute is specified, it takes precedence over * the {@link #style} attribute. When no annotation attributes are specified, * the default format applied is style-based for either number of currency, - * depending on the annotated field type. + * depending on the annotated field or method parameter type. * * @author Keith Donald * @author Juergen Hoeller