@Test public void testStringNullToEmpty() { String str = "This is a test"; assertEquals(str, StringUtils.nullToEmpty(str)); assertEquals("", StringUtils.nullToEmpty(null)); }
public static String nullToEmpty(@Nullable String string) { return string == null ? "" : string; }
StringUtils { public static String nullToEmpty(@Nullable String string) { return string == null ? "" : string; } }
StringUtils { public static String nullToEmpty(@Nullable String string) { return string == null ? "" : string; }  }
StringUtils { public static String nullToEmpty(@Nullable String string) { return string == null ? "" : string; }  static String join(final String... elements); static String joinUsingDelim(String delim, final String... elements); static String join(final String[] array, final String separator); static String toHexString(byte[] bytes); static boolean isNullOrEmpty(String str); static String nullToEmpty(@Nullable String string); static String objToString(@Nullable Object obj); static @Nullable String emptyToNull(@Nullable String string); }
StringUtils { public static String nullToEmpty(@Nullable String string) { return string == null ? "" : string; }  static String join(final String... elements); static String joinUsingDelim(String delim, final String... elements); static String join(final String[] array, final String separator); static String toHexString(byte[] bytes); static boolean isNullOrEmpty(String str); static String nullToEmpty(@Nullable String string); static String objToString(@Nullable Object obj); static @Nullable String emptyToNull(@Nullable String string);  }