List<String> () { List<String> options = new ArrayList<>(); if (!myProjectsCmdOptionValues.isEmpty()) { options.add("--projects=" + String.join(",", myProjectsCmdOptionValues)); } if (StringUtil.isNotEmpty(myCmdOptions)) { options.add(myCmdOptions); } return options; }