< prev index next >

src/java.management/share/classes/javax/management/openmbean/TabularType.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

*** 163,173 **** /** * Checks that String[] does not contain any empty (or blank characters only) string. */ private static void checkForEmptyString(String[] arg, String argName) { for (int i=0; i<arg.length; i++) { ! if (arg[i].trim().equals("")) { throw new IllegalArgumentException("Argument's element "+ argName +"["+ i +"] cannot be an empty string."); } } } --- 163,173 ---- /** * Checks that String[] does not contain any empty (or blank characters only) string. */ private static void checkForEmptyString(String[] arg, String argName) { for (int i=0; i<arg.length; i++) { ! if (arg[i].trim().isEmpty()) { throw new IllegalArgumentException("Argument's element "+ argName +"["+ i +"] cannot be an empty string."); } } }
< prev index next >