@Test public void Null_Date2Day() { Assert.assertNull(c.convert(null, null)); Assert.assertNull(c.convert(String.class, null)); Assert.assertNull(c.convert(Date.class, null)); Assert.assertNull(c.convert(Date2Day.class, null)); }
public Object convert(@SuppressWarnings("rawtypes") Class clazz, Object value) { if (value == null) return null; if (value instanceof String) { if (!"".equals((String) value)) { try { return new Date2Day(Date2Day.formater.parse((String) value) .getTime()); } catch (ParseException e) { throw new CoreException(e); } } else { return null; } } else if (value instanceof Date) { return new Date2Day(((Date) value).getTime()); } else { return value; } }
Date2DayConverter implements Converter { public Object convert(@SuppressWarnings("rawtypes") Class clazz, Object value) { if (value == null) return null; if (value instanceof String) { if (!"".equals((String) value)) { try { return new Date2Day(Date2Day.formater.parse((String) value) .getTime()); } catch (ParseException e) { throw new CoreException(e); } } else { return null; } } else if (value instanceof Date) { return new Date2Day(((Date) value).getTime()); } else { return value; } } }
Date2DayConverter implements Converter { public Object convert(@SuppressWarnings("rawtypes") Class clazz, Object value) { if (value == null) return null; if (value instanceof String) { if (!"".equals((String) value)) { try { return new Date2Day(Date2Day.formater.parse((String) value) .getTime()); } catch (ParseException e) { throw new CoreException(e); } } else { return null; } } else if (value instanceof Date) { return new Date2Day(((Date) value).getTime()); } else { return value; } }  }
Date2DayConverter implements Converter { public Object convert(@SuppressWarnings("rawtypes") Class clazz, Object value) { if (value == null) return null; if (value instanceof String) { if (!"".equals((String) value)) { try { return new Date2Day(Date2Day.formater.parse((String) value) .getTime()); } catch (ParseException e) { throw new CoreException(e); } } else { return null; } } else if (value instanceof Date) { return new Date2Day(((Date) value).getTime()); } else { return value; } }  Object convert(@SuppressWarnings("rawtypes") Class clazz, Object value); }
Date2DayConverter implements Converter { public Object convert(@SuppressWarnings("rawtypes") Class clazz, Object value) { if (value == null) return null; if (value instanceof String) { if (!"".equals((String) value)) { try { return new Date2Day(Date2Day.formater.parse((String) value) .getTime()); } catch (ParseException e) { throw new CoreException(e); } } else { return null; } } else if (value instanceof Date) { return new Date2Day(((Date) value).getTime()); } else { return value; } }  Object convert(@SuppressWarnings("rawtypes") Class clazz, Object value);  }