aboutsummaryrefslogtreecommitdiff
path: root/juick-core
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-17 11:10:12 +0300
committerGravatar Vitaly Takmazov2016-11-17 11:11:03 +0300
commit0197c67e8f52c03b21d9661288f52895d71d69bf (patch)
tree14c88cfd130eac4aa4aa2d19c211f27389e3d9b3 /juick-core
parent346cdb1c3a7b54e3778604951caa684ea4f55d2e (diff)
juick-core: fix NPE in xml date marshalling
Diffstat (limited to 'juick-core')
-rw-r--r--juick-core/src/main/java/com/juick/xml/adapters/SimpleDateAdapter.java3
1 files changed, 3 insertions, 0 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 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<String, Date> {
@Override
public String marshal(Date v) throws Exception {
+ if (v == null) {
+ return "";
+ }
synchronized (dateFormat) {
return dateFormat.format(v);
}