Here you can find the source of null2empty(String str)
public static String null2empty(String str)
//package com.java2s; public class Main { public static String null2empty(String str) { return str == null ? "" : str; }//from w w w. jav a2 s . com }