/** * Check that the string is not empty, is not null, and does not contain only whitespace. * * @param argument String * @param name The name of the argument * @throws IllegalArgumentException If string is null or empty */ public static void isNotEmpty( String argument, String name ) { isNotZeroLength(argument, name); if (argument != null && argument.trim().length() == 0) { throw new IllegalArgumentException(CommonI18n.argumentMayNotBeNullOrZeroLengthOrEmpty.text(name)); } }