code: protected static String getStringValue(Configuration config, String key) {
          try {
              String values[] = config.getStringArray(key);
              if (values == null) {
                  return null;
              }
              if (values.length == 0) {
                  return config.getString(key);
              } else if (values.length == 1) {
                  return values[0];
              }
  
              StringBuilder sb = new StringBuilder();
              for (int i = 0; i < values.length; i++) {
                  sb.append(values[i]);
                  if (i != values.length - 1) {
                      sb.append(",");
                  }
              }
              return sb.toString();
          } catch (Exception e) {
              Object v = config.getProperty(key);
              if (v != null) {
                  return String.valueOf(v);
              } else {
                  return null;
              }
          }
      }
docs: This is to workaround the issue that {@link AbstractConfiguration} by default
  automatically convert comma delimited string to array