Here you can find the source of convertNullToEmptyString(String s)
s
is null; otherwise, returns s
.
public static String convertNullToEmptyString(String s)
//package com.java2s; public class Main { /** Returns the empty string if <code>s</code> is null; otherwise, returns <code>s</code>. */ public static String convertNullToEmptyString(String s) { return (s == null) ? "" : s; }/* ww w . j av a2 s .c o m*/ }