diff --git a/org.springframework.context/src/main/java/org/springframework/format/annotation/ISODateTimeFormat.java b/org.springframework.context/src/main/java/org/springframework/format/annotation/ISODateTimeFormat.java
index 938a971d60e..02e92070181 100644
--- a/org.springframework.context/src/main/java/org/springframework/format/annotation/ISODateTimeFormat.java
+++ b/org.springframework.context/src/main/java/org/springframework/format/annotation/ISODateTimeFormat.java
@@ -22,6 +22,7 @@ import java.lang.annotation.Target;
/**
* Declares that a field should be formatted as a ISO date time.
+ * Can be applied to java.util.Date, java.util.Calendar, java.long.Long, or Joda Time fields.
* @author Keith Donald
* @since 3.0
*/
diff --git a/org.springframework.context/src/main/java/org/springframework/format/datetime/joda/ISODateTimeFormatAnnotationFormatterFactory.java b/org.springframework.context/src/main/java/org/springframework/format/datetime/joda/ISODateTimeFormatAnnotationFormatterFactory.java
index 46958ab0d09..afc48045547 100644
--- a/org.springframework.context/src/main/java/org/springframework/format/datetime/joda/ISODateTimeFormatAnnotationFormatterFactory.java
+++ b/org.springframework.context/src/main/java/org/springframework/format/datetime/joda/ISODateTimeFormatAnnotationFormatterFactory.java
@@ -28,10 +28,10 @@ import org.springframework.format.annotation.ISODateTimeFormat.ISO;
public final class ISODateTimeFormatAnnotationFormatterFactory extends AbstractDateTimeAnnotationFormatterFactory {
protected DateTimeFormatter configureDateTimeFormatterFrom(ISODateTimeFormat annotation) {
- ISO style = annotation.value();
- if (style == ISO.DATE) {
+ ISO format = annotation.value();
+ if (format == ISO.DATE) {
return org.joda.time.format.ISODateTimeFormat.date();
- } else if (style == ISO.TIME) {
+ } else if (format == ISO.TIME) {
return org.joda.time.format.ISODateTimeFormat.time();
} else {
return org.joda.time.format.ISODateTimeFormat.dateTime();