Here you can find the source of emptyToNull(String string)
public static String emptyToNull(String string)
//package com.java2s; public class Main { public static String emptyToNull(String string) { return isNullOrEmpty(string) ? null : string; }/*from ww w .ja v a2s .c o m*/ public static boolean isNullOrEmpty(String string) { return string == null || string.isEmpty(); } }