From f3963f0b12055ba6710b9b28ddc93a5b5fe91d67 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 22 Sep 2017 16:39:00 +0300 Subject: Initial getNotifications query * using Java 8 DateTime API where possible --- .../src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'juick-core/src/main/java/com/juick/xml/adapters') 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 { +public class SimpleDateAdapter extends XmlAdapter { @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); } } -- cgit v1.2.3