Here you can find the source of safeTimestamp(Date value)
public static Timestamp safeTimestamp(Date value)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.util.Date; public class Main { public static Timestamp safeTimestamp(Date value) { return value != null ? new Timestamp(value.getTime()) : null; }//from ww w .j a v a 2s . c o m }