< prev index next >
src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
*** 263,273 ****
// Parse string com.sun.management.prop=xxx,com.sun.management.prop=yyyy
// and return property set if args is null or empty
// return empty property set
private static Properties parseString(String args) {
Properties argProps = new Properties();
! if (args != null && !args.trim().equals("")) {
for (String option : args.split(",")) {
String s[] = option.split("=", 2);
String name = s[0].trim();
String value = (s.length > 1) ? s[1].trim() : "";
--- 263,273 ----
// Parse string com.sun.management.prop=xxx,com.sun.management.prop=yyyy
// and return property set if args is null or empty
// return empty property set
private static Properties parseString(String args) {
Properties argProps = new Properties();
! if (args != null && !args.trim().isEmpty()) {
for (String option : args.split(",")) {
String s[] = option.split("=", 2);
String name = s[0].trim();
String value = (s.length > 1) ? s[1].trim() : "";
< prev index next >