< prev index next >
src/java.management/share/classes/javax/management/openmbean/OpenType.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
*** 266,276 ****
}
/* Return argValue.trim() provided argValue is neither null nor empty;
otherwise throw IllegalArgumentException. */
private static String valid(String argName, String argValue) {
! if (argValue == null || (argValue = argValue.trim()).equals(""))
throw new IllegalArgumentException("Argument " + argName +
" cannot be null or empty");
return argValue;
}
--- 266,276 ----
}
/* Return argValue.trim() provided argValue is neither null nor empty;
otherwise throw IllegalArgumentException. */
private static String valid(String argName, String argValue) {
! if (argValue == null || (argValue = argValue.trim()).isEmpty())
throw new IllegalArgumentException("Argument " + argName +
" cannot be null or empty");
return argValue;
}
< prev index next >