@Test public void test() { Date d = new Date(); System.out.println(d.getTime()); Date d1 = DateUtils.cloneDate(d); System.out.println(d1.getTime()); Assert.assertEquals(d, d1); Assert.assertNull(DateUtils.cloneDate(null)); }
public static Date cloneDate(Date d) { if (d == null) { return d; } else { return new Date(d.getTime()); } }
DateUtils { public static Date cloneDate(Date d) { if (d == null) { return d; } else { return new Date(d.getTime()); } } }
DateUtils { public static Date cloneDate(Date d) { if (d == null) { return d; } else { return new Date(d.getTime()); } }  }
DateUtils { public static Date cloneDate(Date d) { if (d == null) { return d; } else { return new Date(d.getTime()); } }  static Date cloneDate(Date d); }
DateUtils { public static Date cloneDate(Date d) { if (d == null) { return d; } else { return new Date(d.getTime()); } }  static Date cloneDate(Date d);  }