gkopff / gson-jodatime-serialisers

A set of Gson serialiser/deserialisers for dealing with Joda Time entities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deserialization error when date or datetime value is empty

anilmamede opened this issue · comments

If local date or datetime is empty on json property, the structure cannot be deserialized. The issue lies on parsing local date or datetime as the following code demonstrate

        final DateTimeFormatter fmt = DateTimeFormat.forPattern(PATTERN);
        fmt.parseLocalDate(null); // throws NPE
        fmt.parseLocalDate(""); // throws java.lang.IllegalArgumentException
commented

This is included in the 1.2.0 release.