public static String joinIgnoringEmpty(String[] strings, char separator) {
    ArrayList<String> list = new ArrayList<String>();
    for(String str : strings) {
      if (StringUtils.isNotBlank(str)) {
        list.add(str);
      }
    }

    return StringUtils.join(list, separator);
  }
Concatenates strings, using a separator. Empty/blank string or null will be
ignored.

@param strings Strings to join.
@param separator Separator to join with.
common/src/java/org/apache/hive/common/util/HiveStringUtils.java