diff options
author | Vitaly Takmazov | 2017-09-22 16:39:00 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-09-22 16:39:00 +0300 |
commit | f3963f0b12055ba6710b9b28ddc93a5b5fe91d67 (patch) | |
tree | e05c2a4ab6cdbda573c800d79b89572840222fea /juick-core/src/main/java/com/juick/xml | |
parent | 030257f473a92693a4b696acfa745bbf64c98580 (diff) |
Initial getNotifications query
* using Java 8 DateTime API where possible
Diffstat (limited to 'juick-core/src/main/java/com/juick/xml')
-rw-r--r-- | juick-core/src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/juick-core/src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java b/juick-core/src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java index 9a6061cf..6dd40582 100644 --- a/juick-core/src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java +++ b/juick-core/src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java @@ -20,21 +20,21 @@ package com.juick.xml.adapters; import com.juick.util.DateFormattersHolder; import javax.xml.bind.annotation.adapters.XmlAdapter; -import java.util.Date; +import java.time.Instant; /** * Created by vitalyster on 15.11.2016. */ -public class SimpleDateAdapter extends XmlAdapter<String, Date> { +public class SimpleDateAdapter extends XmlAdapter<String, Instant> { @Override - public String marshal(Date v) throws Exception { + public String marshal(Instant v) throws Exception { return DateFormattersHolder.getMessageFormatterInstance().format(v); } @Override - public Date unmarshal(String v) throws Exception { + public Instant unmarshal(String v) throws Exception { return DateFormattersHolder.getMessageFormatterInstance().parse(v); } } |