@SuppressWarnings("unchecked") public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) { Object value = DateDeserializer.instance.deserialze(parser, type, fieldName); if (value instanceof Calendar) { return (T) value; } Date date = (Date) value; if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return (T) calendar; }
public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) { Date value = DateDeserializer.instance.deserialze(parser, type, fieldName); if (value instanceof Calendar) { return value; } Date date = value; if (date == null) { return null; } Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar; }
@SuppressWarnings("unchecked") public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) { Date date = DateDeserializer.instance.deserialze(parser, type, fieldName); Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return (T) calendar; }