From 0197c67e8f52c03b21d9661288f52895d71d69bf Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 17 Nov 2016 11:10:12 +0300 Subject: juick-core: fix NPE in xml date marshalling --- juick-core/src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-core') 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 9cb56909..264f8c22 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,6 +20,9 @@ public class SimpleDateAdapter extends XmlAdapter { @Override public String marshal(Date v) throws Exception { + if (v == null) { + return ""; + } synchronized (dateFormat) { return dateFormat.format(v); } -- cgit v1.2.3