sb.append(it.hasNext() ? "," : "]");
if (it.hasNext()) { sb.append(","); }
  private void updateParams(Properties props) {    communityToMonitor = props.getProperty("community");    String specifiedRestartNodes = restartLocatorProps.getProperty("restartNodes");    if (specifiedRestartNodes != null && specifiedRestartNodes.trim().length() > 0) {      Attribute restartNodesAttr = new BasicAttribute("RestartNode");      StringTokenizer st = new  StringTokenizer(specifiedRestartNodes, " ");      while (st.hasMoreTokens()) {        restartNodesAttr.add(st.nextToken());      }      ModificationItem mods[] = new ModificationItem[]{        new ModificationItem(DirContext.REPLACE_ATTRIBUTE, restartNodesAttr),      };      communityService.modifyCommunityAttributes(communityToMonitor, mods);    }    Collection restartNodes = getSpecifiedNodes();    StringBuffer sb = new StringBuffer("[");    for (Iterator it = restartNodes.iterator(); it.hasNext();) {      sb.append((String)it.next());      sb.append(it.hasNext() ? "," : "]");    }    props.setProperty("restartNode",sb.toString());  }