diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java | 7 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java b/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java index f2965e0..53e9d4e 100644 --- a/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java +++ b/src/main/java/com/amazon/carbonado/adapter/DateTimeAdapter.java @@ -44,10 +44,9 @@ import com.amazon.carbonado.adapter.AdapterDefinition; /**
* Converts Joda-Time datetime objects to and from other forms. This adapter is
* applied automatically for all storable properties of type {@link DateTime},
- * {@link DateMidnight}, {@link LocalDateTime} and {@link LocalDate}. Explicit
- * use allows a different time zone to be used. DateTimeAdapter can also be
- * used to support {@link Date} properties, but it must be explicitly
- * specified.
+ * {@link DateMidnight}, {@link LocalDateTime}, {@link LocalDate} and also
+ * {@link java.util.Date}. Explicit use allows a different time zone to be
+ * used, but this only works for Joda-Time objects.
*
* <p>Example:<pre>
* public interface UserInfo extends Storable {
diff --git a/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java b/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java index dad7f17..1a1b0c9 100644 --- a/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java +++ b/src/main/java/com/amazon/carbonado/info/AutomaticAdapterSelector.java @@ -55,7 +55,8 @@ class AutomaticAdapterSelector { if (DateTime.class.isAssignableFrom(propertyType) ||
DateMidnight.class.isAssignableFrom(propertyType) ||
LocalDate.class.isAssignableFrom(propertyType) ||
- LocalDateTime.class.isAssignableFrom(propertyType))
+ LocalDateTime.class.isAssignableFrom(propertyType) ||
+ java.util.Date.class.isAssignableFrom(propertyType))
{
return selectAdapter(property, DateTimeAdapter.class, readMethod);
} else if (String.class.isAssignableFrom(propertyType)) {
|