@Test public void testDateToStringWithFormatNullDate() throws Exception { String date = DateUtils.dateToStringWithFormat(null, DateFormatConstants.DATE_FORMAT_TIME); assertNull(date); }
public static String dateToStringWithFormat(Date dateToString, String dateFormat) { if (dateToString != null) { DateFormat simpleDateFormat = new SimpleDateFormat(dateFormat); return simpleDateFormat.format(dateToString); } else { return null; } }
DateUtils { public static String dateToStringWithFormat(Date dateToString, String dateFormat) { if (dateToString != null) { DateFormat simpleDateFormat = new SimpleDateFormat(dateFormat); return simpleDateFormat.format(dateToString); } else { return null; } } }
DateUtils { public static String dateToStringWithFormat(Date dateToString, String dateFormat) { if (dateToString != null) { DateFormat simpleDateFormat = new SimpleDateFormat(dateFormat); return simpleDateFormat.format(dateToString); } else { return null; } } private  DateUtils(); }
DateUtils { public static String dateToStringWithFormat(Date dateToString, String dateFormat) { if (dateToString != null) { DateFormat simpleDateFormat = new SimpleDateFormat(dateFormat); return simpleDateFormat.format(dateToString); } else { return null; } } private  DateUtils(); static Date stringToDateWithFormat(String stringToConvert, String dateFormat); static String dateToStringWithFormat(Date dateToString, String dateFormat); }
DateUtils { public static String dateToStringWithFormat(Date dateToString, String dateFormat) { if (dateToString != null) { DateFormat simpleDateFormat = new SimpleDateFormat(dateFormat); return simpleDateFormat.format(dateToString); } else { return null; } } private  DateUtils(); static Date stringToDateWithFormat(String stringToConvert, String dateFormat); static String dateToStringWithFormat(Date dateToString, String dateFormat);  }