protected static String listToCommaDelimitedString(List<String> stringList){
  if (stringList == null) {
    return "";
  }
  StringBuilder result=new StringBuilder();
  for (Iterator<String> it=stringList.iterator(); it.hasNext(); ) {
    Object element=it.next();
    if (element != null) {
      result.append(element);
      if (it.hasNext()) {
        result.append(", ");
      }
    }
  }
  return result.toString();
}

protected static String listToCommaDelimitedString ( List < String > stringList ) { if ( stringList == null ) { return "" ; } StringBuilder result = new StringBuilder ( ) ; for ( Iterator < String > it = stringList . iterator ( ) ; it . hasNext ( ) ; ) { Object element = it . next ( ) ; if ( element != null ) { result . append ( element ) ; if ( it . hasNext ( ) ) { result . append ( ", " ) ; } } } return result . toString ( ) ; }
convert an array of strings in a comma delimited string
