code: @SuppressWarnings("unchecked")
      @FFDCIgnore(Exception.class)
      public static String[] parseStringArray(Object configAlias, String propertyKey, Object obj, String[] defaultValue) {
          final String[] emptyArray = new String[0];
  
          if (obj != null) {
              try {
                  if (obj instanceof String[]) {
                      return (String[]) obj;
                  } else if (obj instanceof String) {
                      String commaList = (String) obj;
                      // split the string, consuming/removing whitespace
                      return commaList.split("\\s*,\\s*");
                  } else if (obj instanceof Collection) {
                      return ((Collection<String>) obj).toArray(emptyArray);
                  }
              } catch (Exception e) {
                  Tr.warning(tc, "invalidStringArray", configAlias, propertyKey, obj);
                  throw new IllegalArgumentException("String array value could not be parsed: key=" + propertyKey + ", value=" + obj, e);
              }
  
              // unknown type
              Tr.warning(tc, "invalidStringArray", configAlias, propertyKey, obj);
              throw new IllegalArgumentException("String array value could not be parsed: key=" + propertyKey + ", value=" + obj);
          }
  
          return defaultValue;
      }
docs: Parse a string array from the provided config value: returns
  an array of strings generated from either a comma-separated single
  string value, or a metatype generated string array.
  <p>
  If an exception occurs converting the object parameter:
  A translated warning message will be issued using the provided propertyKey and object
  as parameters. FFDC for the exception is suppressed: Callers should handle the thrown
  IllegalArgumentException as appropriate.
  
  @param configAlias
  Name of config (pid or alias) associated with a registered service
  or DS component.
  @param propertyKey
  The key used to retrieve the property value from the map.
  Used in the warning message if the value is badly formed.
  @param obj
  The object retrieved from the configuration property map/dictionary.
  @param defaultValue
  The default value that should be applied if the object is null.
  @return An array of strings parsed from the obj parameter, or default value if obj is null
  @throws IllegalArgumentException If value is not a String or String array, or if an error
  occurs while converting/casting the object to the return parameter type.