@Test public void testThatDefaultIfBlankReturnsDefaultStringIfPrimaryStringIsEmpty() { final String emptyPrimaryString = ""; assert !DEFAULT_STRING.equals(emptyPrimaryString); final String sanitizedString = StringUtils.defaultIfBlank(emptyPrimaryString, DEFAULT_STRING); assertEquals( "defaultIfBlank should have returned the default string", DEFAULT_STRING, sanitizedString); }
@NonNull public static String defaultIfBlank(@Nullable final String primaryString, @NonNull final String defaultString) { return isBlank(primaryString) ? defaultString : primaryString; }
StringUtils { @NonNull public static String defaultIfBlank(@Nullable final String primaryString, @NonNull final String defaultString) { return isBlank(primaryString) ? defaultString : primaryString; } }
StringUtils { @NonNull public static String defaultIfBlank(@Nullable final String primaryString, @NonNull final String defaultString) { return isBlank(primaryString) ? defaultString : primaryString; } private  StringUtils(); }
StringUtils { @NonNull public static String defaultIfBlank(@Nullable final String primaryString, @NonNull final String defaultString) { return isBlank(primaryString) ? defaultString : primaryString; } private  StringUtils(); @NonNull static String defaultIfBlank(@Nullable final String primaryString, @NonNull final String defaultString); }
StringUtils { @NonNull public static String defaultIfBlank(@Nullable final String primaryString, @NonNull final String defaultString) { return isBlank(primaryString) ? defaultString : primaryString; } private  StringUtils(); @NonNull static String defaultIfBlank(@Nullable final String primaryString, @NonNull final String defaultString);  }